Meziantou.Framework.QRCode 1.0.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Meziantou.Framework.QRCode --version 1.0.2
                    
NuGet\Install-Package Meziantou.Framework.QRCode -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.QRCode" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.QRCode" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.QRCode" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.QRCode --version 1.0.2
                    
#r "nuget: Meziantou.Framework.QRCode, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.QRCode@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.QRCode&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.QRCode&version=1.0.2
                    
Install as a Cake Tool

Meziantou.Framework.QRCode

QR code generation library with SVG and console renderers. Implements the QR code specification from scratch with support for standard QR, Micro QR, and Rectangular Micro QR (rMQR) codes.

Supported QR Code Types

Type Method Sizes Description
Standard QR QRCode.Create(...) 21x21 to 177x177 ISO/IEC 18004, versions 1-40
Micro QR QRCode.CreateMicroQR(...) 11x11 to 17x17 ISO/IEC 18004, versions M1-M4
rMQR QRCode.CreateRMQR(...) Rectangular (width > height) ISO/IEC 23941

Usage

Generate QR codes (Standard, Micro QR, rMQR)

// Standard QR code
var standardQr = QRCode.Create("HELLO WORLD", ErrorCorrectionLevel.H);

// Micro QR code (smaller, single finder pattern)
var microQr = QRCode.CreateMicroQR("12345", ErrorCorrectionLevel.L);

// Rectangular Micro QR code (narrow rectangular shape)
var rmqr = QRCode.CreateRMQR("https://www.meziantou.net", ErrorCorrectionLevel.M);

// Format info
Console.WriteLine($"{standardQr.Type} {standardQr.Width}x{standardQr.Height}");
Console.WriteLine($"{microQr.Type} {microQr.Width}x{microQr.Height}");
Console.WriteLine($"{rmqr.Type} {rmqr.Width}x{rmqr.Height}");

Render as SVG

var svg = standardQr.ToSvg();
var microSvg = microQr.ToSvg(new QRCodeSvgOptions { ModuleSize = 2, QuietZoneModules = 2 });
var rmqrSvg = rmqr.ToSvg(new QRCodeSvgOptions { ModuleSize = 2, QuietZoneModules = 2 });

var customSvg = standardQr.ToSvg(new QRCodeSvgOptions
{
    ModuleSize = 10,
    QuietZoneModules = 4,
    DarkColor = "#000000",
    LightColor = "#ffffff",
});

Render to console

standardQr.WriteToConsole();
var standardText = standardQr.ToConsoleString();
var microText = microQr.ToConsoleString(new QRCodeConsoleOptions
{
    QuietZoneModules = 1,
    ModuleWidth = 2,
    ModuleHeight = 2, // 2x bigger output that can look more square on many terminals
});

var rmqrText = rmqr.ToConsoleString(new QRCodeConsoleOptions
{
    QuietZoneModules = 1,
    ModuleWidth = 2,
    ModuleHeight = 2,
});

Content helpers

// WiFi
var wifi = QRCodePayload.Wifi("MyNetwork", "password123", WifiAuthentication.WPA);

// vCard
var vcard = QRCodePayload.VCard("Doe", "John", phone: "+1234567890", email: "john@example.com");

// MeCard (compact contact format)
var mecard = QRCodePayload.MeCard("Doe", "John", phone: "+1234567890");

// Email
var email = QRCodePayload.Email("test@example.com", subject: "Hello");

// Phone
var phone = QRCodePayload.Phone("+1234567890");

// SMS
var sms = QRCodePayload.Sms("+1234567890", "Hello!");

// Geolocation
var geo = QRCodePayload.Geolocation(48.8566, 2.3522);

// Calendar event
var evt = QRCodePayload.CalendarEvent("Meeting",
    new DateTime(2025, 6, 15, 14, 0, 0, DateTimeKind.Utc),
    new DateTime(2025, 6, 15, 15, 0, 0, DateTimeKind.Utc),
    location: "Room 42");

// OTP Auth (2FA setup)
var otp = QRCodePayload.OneTimePassword(OneTimePasswordType.Totp,
    "JBSWY3DPEHPK3PXP", "user@example.com", issuer: "MyApp");

// Bitcoin payment
var btc = QRCodePayload.Bitcoin("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", amount: 0.05m);

// SEPA payment (EPC QR)
var sepa = QRCodePayload.SepaPayment("Example", "DE00000000000000000000", 12.50m,
    remittanceText: "Donation");
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Meziantou.Framework.QRCode:

Package Downloads
Meziantou.Framework.QRCode.Imaging

Renders QR codes and barcodes of Meziantou.Framework.QRCode as Meziantou.Framework.Imaging images

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.4 148 10/21/2026 2.0.4 is deprecated because it is no longer maintained.
2.0.3 213 9/6/2026
2.0.2 140 8/29/2026
2.0.1 239 7/8/2026
2.0.0 162 7/5/2026
1.0.12 172 6/28/2026
1.0.11 153 6/13/2026
1.0.10 141 6/7/2026
1.0.9 192 5/23/2026
1.0.8 133 5/17/2026
1.0.7 145 5/15/2026
1.0.6 138 5/14/2026
1.0.5 167 4/25/2026
1.0.4 149 4/9/2026
1.0.3 130 4/9/2026
1.0.2 133 4/9/2026
1.0.1 129 4/9/2026
1.0.0 149 4/8/2026