.NET & C# Barcode Scanner SDK

Add offline 1D and 2D barcode scanning directly inside your C# service or desktop application. Install one MIT-licensed NuGet package carrying bundled native libraries for five systems, decode label images in process and keep every identifier as an exact string.

Text
using System.Linq;
using QRCodeAI.QRCodeBarcodeScanner;

var report = Scanner.Scan(imageBytes, new ScanOptions { Profile = ScanProfile.Frame });
var barcode = report.Detections.FirstOrDefault(d => d.Symbology == "code128");

Console.WriteLine(barcode?.Text);

Inspect the decoded identifierSTOCK-4827

Read label images

Pass PNG, JPEG, WebP or GIF label bytes to Scanner.Scan(). A Code 128 label encoding STOCK-4827 returns that exact string.

Shell
dotnet add package QRCodeAI.QRCodeBarcodeScanner

Want to scan a barcode now? Open the online reader

.NET & C# Barcode Scanner SDK at a glance

  • QRCodeAI.QRCodeBarcodeScanner

    NuGet

  • Linux glibc, macOS & Windows x64

    5 OS/arch

  • EAN, UPC, Code 128, Data Matrix & more

    1D + 2D

  • Open-source license

    MIT

Run in-process barcode scanning in .NET

Decode 1D retail, warehouse and 2D matrix labels inside C# services and desktop apps with bundled native libraries.

Read label images

Pass PNG, JPEG, WebP or GIF label bytes to Scanner.Scan(). A Code 128 label encoding STOCK-4827 returns that exact string.

Scan raw RGBA frames

Pass raw RGBA pixels with width and height to Scanner.ScanFrame(). Both methods are thread-safe across concurrent .NET tasks.

Keep exact strings & formats

Filter symbologies via ScanOptions.Formats and keep Detection.Text as a C# string so leading zeros survive intact.

Add barcode image reading in C# and .NET

Install the NuGet package, restrict symbologies in ScanOptions and return exact identifier strings.

Add the NuGet package

Install QRCodeAI.QRCodeBarcodeScanner on NuGet. Targets .NET 8 and is tested on .NET 8 and .NET 10 (.NET 10 is Microsoft’s current LTS release).

Includes native libraries for Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine / musl Linux is not covered.

Shell
dotnet add package QRCodeAI.QRCodeBarcodeScanner

No external CLI binary or Rust toolchain is required; the managed package loads its bundled native UniFFI library in process.

Fresh-install verification runs on all five supported OS/architecture platforms.

Decode a barcode image in C#

Pass encoded label bytes (PNG, JPEG, WebP or GIF) and ScanOptions.Formats to Scanner.Scan so only the requested barcode readers run.

To test with a known fixture, create a Code 128 barcode with Barcode Generator encoding STOCK-4827 and scan the exported PNG.

Text
using QRCodeAI.QRCodeBarcodeScanner;

var bytes = File.ReadAllBytes("label.png");
var options = new ScanOptions
{
    Profile = ScanProfile.Frame,
    Formats = ["code128", "code39", "ean13", "ean8", "upc_a", "upc_e", "itf", "data_matrix"],
};

var report = Scanner.Scan(bytes, options);
foreach (var detection in report.Detections)
{
    Console.WriteLine($"{detection.Symbology}: {detection.Text}");
}

Switch to ScanProfile.Full or set BudgetMs = 0 for low-contrast or damaged labels. Always check report.Complete before treating empty results as final.

Add pdf417, aztec, code93, codabar, data_bar, data_bar_expanded, telepen or maxi_code to Formats as needed.

Inspect the decoded identifier

For a Code 128 label encoding STOCK-4827, detection.Symbology is "code128" and detection.Text is "STOCK-4827". A UPC-A code such as 012345678905 stays a C# string with its leading zero intact.

No matching barcode sets report.Found to false without throwing. Invalid files or unknown options throw ScanException with Case and optional engine Code (such as QRS-001).

.NET barcode coverage, thread safety and runtime floors

Sixteen barcode formats. Decodes EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode (ISBN maps to ean13, GS1-128 to code128, ITF-14 to itf).

Concurrency and options. Scanner.Scan and Scanner.ScanFrame are thread-safe in process; configure MaxDimension, MaxPixels and Formats via ScanOptions (see option domains). Parse report.Json for GS1 payloads and keep product lookups separate.

Runtime floors and MIT license. Supports .NET 8 and .NET 10 on five glibc/macOS/Windows targets (no musl). Current releases are MIT-licensed; see the .NET binding README.

.NET Barcode Scanner documentation and license

Official package documentation, ScanReport specification and licensing references.

.NET & C# Barcode Scanner SDK questions

NuGet, formats, leading zeros, native targets, thread safety and licensing.

It is QR Code AI’s open-source MIT NuGet package (QRCodeAI.QRCodeBarcodeScanner) that bundles the native Rust engine in process for .NET 8 and .NET 10, decoding 16 1D and 2D barcode formats plus QR codes.

It reads EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode, plus QR Code, Micro QR and rMQR. Set ScanOptions.Formats to run only the readers you need.

Targets .NET 8 and is tested on .NET 8 and .NET 10 (.NET 10 is the supported LTS release). Native libraries ship for Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine / musl Linux is not covered.

No. Each detection returns its Symbology and exact Text string (preserving UPC-A and EAN-13 leading zeros), plus raw bytes and GS1 fields in report.Json. Query your own ERP or product catalog separately.

Yes. Both Scanner.Scan and Scanner.ScanFrame are thread-safe and synchronous in process, so multiple concurrent requests or background workers can call them safely.

No matching barcode sets report.Found to false without throwing (confirm report.Complete is true). Invalid files, size-limit violations or invalid options throw ScanException with a typed Case and optional engine Code such as QRS-001.

No. The bundled native library runs 100% locally inside your .NET process with no external binary, no network calls, no QR Code AI account and no creation credits.

Yes. Current releases are MIT-licensed for commercial and proprietary applications while retaining copyright and license notices (see LICENSING.md). SDK use is separate from QR Code AI’s paid creation plans and seven-day Premium trial.