QRCoder: A Pure C# Open Source QR Code Implementation

QRCoder: A Pure C# Open Source QR Code Implementation

Summary

QRCoder is a robust, pure C# open-source library designed for generating QR codes and Micro QR codes. It offers zero dependencies, fast performance, and supports multiple output formats like PNG, SVG, and PDF. With over 23 payload generators and extensive configurability, QRCoder is a versatile solution for integrating QR code functionality into .NET applications.

Repository Info

Updated on October 12, 2025
View on GitHub

Tags

Click on any tag to explore related repositories

Introduction

QRCoder is a powerful, pure C# open-source library designed for generating both standard QR codes and smaller Micro QR codes. Originally created by Raffael Herrmann and now maintained by Shane32 with community contributions, this project has garnered significant attention, boasting 4951 stars and 1162 forks on GitHub. Licensed under the permissive MIT License, QRCoder provides a robust and flexible solution for integrating QR code generation into various .NET applications.

Installation

Integrating QRCoder into your project is straightforward via NuGet Package Manager:

PM> Install-Package QRCoder

Examples

Generating a QR code with QRCoder can be done with just a few lines of C# code. Here's a quick start example demonstrating how to create both PNG and SVG QR codes:

using QRCoder;

// Generate a simple black and white PNG QR code
byte[] qrCodeImage = PngByteQRCodeHelper.GetQRCode("Hello World", QRCodeGenerator.ECCLevel.Q, 20);

// Generate a scalable black and white SVG QR code
using var qrCodeData = QRCodeGenerator.GenerateQrCode("Hello World", QRCodeGenerator.ECCLevel.Q);
using var svgRenderer = new SvgQRCode(qrCodeData);
string svg = svgRenderer.GetGraphic();

For more detailed usage instructions and advanced examples, refer to the QRCoder Wiki: How to use QRCoder.

Why Use QRCoder?

QRCoder stands out with a comprehensive set of features that make it an excellent choice for QR code generation:

  • Zero Dependencies: The library requires no external libraries, relying only on framework dependencies, ensuring a lean integration.
  • Fast Performance: Optimized for efficient QR code generation with a low memory footprint.
  • Multiple Output Formats: Supports a wide array of output formats including PNG, SVG, PDF, ASCII, Bitmap, PostScript, and more, catering to diverse application needs.
  • 23+ Payload Generators: Includes built-in generators for common data types like WiFi credentials, vCards, URLs, payment information, and many others, simplifying structured data encoding.
  • Highly Configurable: Offers extensive options for error correction levels, custom colors, embedding logos, and styling, allowing for highly customized QR codes.
  • Cross-Platform: Compatible with a broad range of .NET environments, including .NET 5+, .NET Framework 3.5+, .NET Core 1.0+, and .NET Standard 1.3+.
  • Micro QR Codes: Supports the generation of Micro QR codes, ideal for applications where space is constrained and smaller codes are required.

Links