ZXingCpp 0.5.3
dotnet add package ZXingCpp --version 0.5.3
NuGet\Install-Package ZXingCpp -Version 0.5.3
<PackageReference Include="ZXingCpp" Version="0.5.3" />
<PackageVersion Include="ZXingCpp" Version="0.5.3" />
<PackageReference Include="ZXingCpp" />
paket add ZXingCpp --version 0.5.3
#r "nuget: ZXingCpp, 0.5.3"
#:package ZXingCpp@0.5.3
#addin nuget:?package=ZXingCpp&version=0.5.3
#tool nuget:?package=ZXingCpp&version=0.5.3
ZXingCpp
ZXingCpp is a high-performance .NET barcode reader and writer powered by zxing-cpp, with a modern API. It supports all major linear and matrix barcode formats like QRCode, DataMatrix, PDF417, EAN/UPC, Code128, etc. It is 5x-50x faster than ZXing.NET, supports more barcode formats (symbologies) and has a higher detection rate on difficult images.
Install
dotnet add package ZXingCpp
dotnet add package SkiaSharp
Read barcodes
SkiaSharp is used here because it works consistently across Windows, Linux, and macOS.
using SkiaSharp;
using ZXingCpp;
var img = SKBitmap.Decode(args[0]).Copy(SKColorType.Gray8);
var iv = new ImageView(img.GetPixels(), img.Info.Width, img.Info.Height, ImageFormat.Lum);
var readBarcodes = new BarcodeReader {
Formats = args.Length > 1 ? BarcodeFormats.Parse(args[1]) : BarcodeFormat.All,
TryInvert = false,
// see the ReaderOptions for more available options
};
foreach (var b in readBarcodes.From(iv))
Console.WriteLine($"{b.Format}: {b.Text}");
Executing this sample code from the command line would look like this:
dotnet run -- <image-file-name> [barcode-format-list]
Write barcodes
using ZXingCpp;
var barcode = new Barcode(args[1], BarcodeFormat.Parse(args[0]));
File.WriteAllText(args[2], barcode.ToSVG());
Executing this sample code from the command line would look like this:
dotnet run -- <barcode-format> <text> <out-svg-file-name>
Why ZXingCpp
- Fast native-core decoding and encoding (5x-50x faster than ZXing.Net).
- Strong real-world detection performance, especially for QRCode.
- Broad format support (QRCode, DataMatrix, PDF417, EAN/UPC, Code128, and more).
- Standards-compliant binary and ECI handling (
bytesECI()). - Apache-2.0 licensed and free for commercial use (Commercial Support available).
For comparative results with other .NET barcode libraries, see zxing-bench.
Platform support
The NuGet package includes native libraries for x64 and arm64 on Windows, Linux, and macOS. Version 0.5.3 includes zxing-cpp-v3.1.1
If you need to override native loading, ensure .NET can find [lib]ZXing[.dll|.so|.dylib]
(for example via PATH on Windows or LD_LIBRARY_PATH on Linux).
More examples
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ZXingCpp:
| Package | Downloads |
|---|---|
|
BarcodeScanning.Native.Maui
Barcode scanning library for .NET MAUI |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ZXingCpp:
| Repository | Stars |
|---|---|
|
afriscic/BarcodeScanning.Native.Maui
Barcode scanning library for .NET MAUI
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.5.3 | 1,594 | 7/29/2026 | |
| 0.5.2 | 5,442 | 7/7/2026 | |
| 0.5.1 | 18,900 | 2/17/2026 | |
| 0.5.0 | 11,171 | 2/13/2026 | |
| 0.4.0-alpha | 12,641 | 1/4/2025 | |
| 0.3.0-alpha | 358 | 11/5/2024 | |
| 0.2.2-alpha | 2,877 | 9/8/2024 |