![]() |
VOOZH | about |
dotnet add package QRCoder.Core --version 2.0.0
NuGet\Install-Package QRCoder.Core -Version 2.0.0
<PackageReference Include="QRCoder.Core" Version="2.0.0" />
<PackageVersion Include="QRCoder.Core" Version="2.0.0" />Directory.Packages.props
<PackageReference Include="QRCoder.Core" />Project file
paket add QRCoder.Core --version 2.0.0
#r "nuget: QRCoder.Core, 2.0.0"
#:package QRCoder.Core@2.0.0
#addin nuget:?package=QRCoder.Core&version=2.0.0Install as a Cake Addin
#tool nuget:?package=QRCoder.Core&version=2.0.0Install as a Cake Tool
A cross-platform .NET library for QR Code generation using SkiaSharp. Compatible with Windows, Linux, macOS, and mobile (Xamarin / MAUI).
Based on QRCoder. Supports .NET Standard 2.1, .NET 8.0, .NET 10.0, and .NET Framework 4.8.
using QRCoder.Core;
// Generate QR code data
using var generator = new QRCodeGenerator();
using var data = generator.CreateQrCode("https://github.com/afonsoft/QRCoder.Core",
QRCodeGenerator.ECCLevel.M);
// Render as PNG bytes (cross-platform, no System.Drawing needed)
using var png = new PngByteQRCode(data);
byte[] pngBytes = png.GetGraphic(10);
File.WriteAllBytes("qrcode.png", pngBytes);
| Format | Class | Example |
|---|---|---|
| PNG | PngByteQRCode |
new PngByteQRCode(data).GetGraphic(10) → byte[] |
| SVG | SvgQRCode |
new SvgQRCode(data).GetGraphic(10) → string |
PdfByteQRCode |
new PdfByteQRCode(data).GetGraphic(5) → byte[] |
|
| ASCII | ASCIIQRCode |
new ASCIIQRCode(data).GetGraphic(1) → string |
| Base64 | Base64QRCode |
new Base64QRCode(data).GetGraphic(10) → string |
| SKBitmap | QRCode |
new QRCode(data).GetGraphic(10) → SKBitmap |
| Postscript | PostscriptQRCode |
new PostscriptQRCode(data).GetGraphic(5) → string |
| Artistic | ArtQRCode |
new ArtQRCode(data).GetGraphic(10) → SKBitmap |
| BMP | BitmapByteQRCode |
new BitmapByteQRCode(data).GetGraphic(10) → byte[] |
using QRCoder.Core;
using var gen = new QRCodeGenerator();
using var data = gen.CreateQrCode("Hello World", QRCodeGenerator.ECCLevel.M);
// SVG
using var svg = new SvgQRCode(data);
string svgString = svg.GetGraphic(10);
// ASCII (terminal)
using var ascii = new ASCIIQRCode(data);
Console.WriteLine(ascii.GetGraphic(1));
// PDF
using var pdf = new PdfByteQRCode(data);
byte[] pdfBytes = pdf.GetGraphic(5);
// With custom colors
using var qr = new QRCode(data);
using var bitmap = qr.GetGraphic(10, "#1a1a2e", "#e0e0e0");
Generate formatted QR code content for common use cases:
using QRCoder.Core;
using var gen = new QRCodeGenerator();
// Wi-Fi
var wifi = new PayloadGenerator.WiFi("MyNetwork", "MyPassword",
PayloadGenerator.WiFi.Authentication.WPA);
using var wifiData = gen.CreateQrCode(wifi.ToString(), QRCodeGenerator.ECCLevel.M);
// URL
var url = new PayloadGenerator.Url("https://github.com/afonsoft/QRCoder.Core");
using var urlData = gen.CreateQrCode(url.ToString(), QRCodeGenerator.ECCLevel.M);
// Email
var mail = new PayloadGenerator.Mail("test@example.com", "Subject", "Body");
using var mailData = gen.CreateQrCode(mail.ToString(), QRCodeGenerator.ECCLevel.M);
// Phone Number
var phone = new PayloadGenerator.PhoneNumber("+1234567890");
using var phoneData = gen.CreateQrCode(phone.ToString(), QRCodeGenerator.ECCLevel.M);
// Contact Card (vCard)
var contact = new PayloadGenerator.ContactData(
PayloadGenerator.ContactData.ContactOutputType.VCard3,
"Doe", "John", phone: "+1234567890", email: "john@example.com");
using var contactData = gen.CreateQrCode(contact.ToString(), QRCodeGenerator.ECCLevel.M);
Supported payloads: URL, WiFi, Mail, SMS, PhoneNumber, MMS, Geolocation, CalendarEvent, ContactData, Bitcoin, Girocode, BezahlCode, SwissQrCode, OneTimePassword, ShadowSocksConfig, Bookmark, SkypeCall, WhatsAppMessage, and more.
| Level | Recovery | Use Case |
|---|---|---|
ECCLevel.L |
~7% | Maximum data capacity |
ECCLevel.M |
~15% | General purpose (recommended) |
ECCLevel.Q |
~25% | Higher reliability |
ECCLevel.H |
~30% | Maximum recovery (logos, artistic QR) |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net48 net48 is compatible. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on QRCoder.Core:
| Package | Downloads |
|---|---|
|
ArielCore.BaseHelpers
Package Description |
|
|
DevPro.Core
Package Description |
|
|
Lib.Servicos.Integracoes
Package Description |
This package is not used by any popular GitHub repositories.
Release version 2.0.0