.NET MAUI

.NET MAUI Barcode Scanner SDK

Add barcode, MRZ and VIN scanning to .NET MAUI apps on Android, iOS and Windows with one NuGet package, Plugin.Maui.Barkoder. Place a BarkoderView in XAML, handle results in C#, and test it on your own barcodes with a free 30-day trial.

maui barcode scanner

A barcode scanning library for C# and XAML apps

barKoder is a .NET MAUI barcode scanning library published on NuGet. You add one package, place a BarkoderView in your XAML page and receive results in C#. The same package covers Android, iOS and Windows.

Test it on the barcodes your users scan

Build a short sample set from your real workflow:

  • Worn or wrinkled labels
  • VINs on vehicles
  • Passports and ID cards
  • Engraved Data Matrix codes

Without a license the SDK still scans, but results come back marked (Unlicensed) and only partly readable. Request a trial key first, then compare reads, misses and time to result on your target devices. A trial license lasts 30 days and covers up to 25 devices.

Start your free trial

Ready to integrate?

Use the installation guide for setup instructions, or explore the API reference and examples for implementation details.

Open the installation guide

Add a .NET MAUI barcode scanner in four steps

The code below is copied from the .NET MAUI installation guide. It registers the handler, adds the view and starts a scan.

  1. InstallAdd the Plugin.Maui.Barkoder barcode scanner NuGet package to your project.
  2. RegisterAdd BarkoderViewHandler in MauiProgram.cs. On iOS, add a camera usage description to Info.plist.
  3. PlaceDeclare the plugin namespace and add BarkoderView with your license key.
  4. ScanImplement IBarkoderDelegate, call StartScanning and handle results in DidFinishScanning.
MauiProgram.cs
using Plugin.Maui.Barkoder.Controls;

var builder = MauiApp.CreateBuilder();
builder
        .UseMauiApp<App>()
        .ConfigureFonts(fonts =>
        {
            // Your custom fonts
        })
        .ConfigureMauiHandlers(handlers =>
        {
            // Your other maui handlers
            handlers.AddHandler(typeof(BarkoderView), typeof(BarkoderViewHandler));
    });
Platforms/iOS/Info.plist and your XAML page
<key>NSCameraUsageDescription</key>
<string>Camera permission</string>

xmlns:barkoder="clr-namespace:Plugin.Maui.Barkoder.Controls;assembly=Plugin.Maui.Barkoder"

<barkoder:BarkoderView
    x:Name="BKDView"
    barkoder:LicenseKey="YOUR_LICENSE_KEY"
    HeightRequest="200"/>
Code-behind (XAML.cs)
using Plugin.Maui.Barkoder.Enums;

...

private void SetBarkoderSettings()
{
  // These are optional settings, otherwise default values will be used
  BKDView.SetImageResultEnabled(true);
  BKDView.SetLocationInImageResultEnabled(true);
  BKDView.SetRegionOfInterestVisible(true);

  // Enable desired barcode type
  BKDView.SetBarcodeTypeEnabled(BarcodeType.QR, true);
  BKDView.SetBarcodeTypeEnabled(BarcodeType.Code128, true);
}

public class YourPage : ContentPage, IBarkoderDelegate
{
    // Your existing methods and properties...

    // Method to start the scanning process
    private void StartScanning()
    {
        // Start scanning using the BarkoderView control and pass 'this' as the delegate
        BKDView.StartScanning(this);
    }

    // Implementing the DidFinishScanning method from IBarkoderDelegate
    public void DidFinishScanning(BarcodeResult[] result)
    {
        // Handle the scanned result here
        foreach (var barcode in result)
        {
            // Do something with each barcode result, for example:
            Console.WriteLine($"Scanned barcode: {barcode.TextualData}");
        }
    }
}

IBarkoderDelegate isn't limited to a ContentPage. The MAUI pitfalls page shows how to use BarkoderView from a view model in an MVVM app.

Continuous scanning, MultiScan, MRZ, VIN and DPM in .NET MAUI

Each mode is a few configuration calls on the same BarkoderView. The snippets come from the .NET MAUI examples in the barKoder docs.

Continuous scanning

Keep the camera session open

Scan item after item without restarting the scanner. The duplicate threshold decides what happens with repeats: -1 reads each barcode once, 0 reads it again with no delay, and a value above 0 waits that many seconds. This is the setup to use when you need a Maui continuous scanning SDK for receiving, counting or picking.

C#
BKDView.SetCloseSessionOnResultEnabled(false);
BKDView.SetThresholdBetweenDuplicatesScans(0); // it can take values -1, or n > 0
Enable continuous scanning in .NET MAUI →

Batch MultiScan

Many barcodes in one pass

Batch MultiScan reads several barcodes of any type at once, which makes the plugin a Maui multiscan SDK for shelves, cartons and pallets. The example keeps the session open, allows up to 200 results and sets decoding speed and resolution to Normal, as the docs recommend.

C#
// Enabling MultiScan
BKDView.SetCloseSessionOnResultEnabled(false);
BKDView.SetMaximumResultsCount(200);

// For best result decoding speed should be normal, and barkoder resolution should be normal
BKDView.SetDecodingSpeed(Plugin.Maui.Barkoder.Enums.DecodingSpeed.Normal);
BKDView.SetBarkoderResolution(Plugin.Maui.Barkoder.Enums.BarkoderResolution.Normal);
Enable MultiScan in .NET MAUI →

MRZ scanning

Passports, ID cards and visas

Turn the view into a Maui MRZ scanner by enabling the ID document type. It reads the machine-readable zone and returns data such as name, nationality, passport number and expiration date. MRZ results can also include images of the document, the holder's picture and the signature.

C#
private void SetActiveBarcodeTypes()
{
    BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.IDDocument, true);
}
Enable MRZ mode in .NET MAUI →

VIN scanning

Code 39, Code 128, Data Matrix and QR

A VIN can be printed in four barcode types. The Maui VIN scanning SDK setup enables all four, applies VIN restrictions and uses slow decoding at FHD resolution. With an OCR-enabled license, OCR VIN support (added in version 1.6.7) reads the printed characters when the barcode can't be decoded.

C#
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.QR, true);
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Datamatrix, true);
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Code128, true);
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Code39, true);

BKDView.SetEnableVINRestrictions(true);
BKDView.SetRegionOfInterest(0, 30, 100, 40);
BKDView.SetRegionOfInterestVisible(true);

BKDView.SetDecodingSpeed(Plugin.Maui.Barkoder.Enums.DecodingSpeed.Slow);
BKDView.SetBarkoderResolution(Plugin.Maui.Barkoder.Enums.BarkoderResolution.FHD);
Enable VIN scanning in .NET MAUI →

DPM mode

Codes etched or printed on parts

Direct Part Marking puts a Data Matrix code straight onto metal or plastic, without a label. As a Maui DPM barcode scanner, the plugin enables Data Matrix with DPM mode, slow decoding, FHD resolution and a small region of interest.

C#
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Datamatrix, true);
BKDView.SetDatamatrixDpmModeEnabled(true);
BKDView.SetDecodingSpeed(Plugin.Maui.Barkoder.Enums.DecodingSpeed.Slow);
BKDView.SetBarkoderResolution(Plugin.Maui.Barkoder.Enums.BarkoderResolution.FHD);
BKDView.SetRegionOfInterest(40, 40, 20, 10);
BKDView.SetRegionOfInterestVisible(true);
See the .NET MAUI DPM example →

Damaged and difficult barcodes

The same decoding engine as the native SDKs

  • MatrixSight® reads QR and Data Matrix codes with missing finder, timing or alignment patterns.
  • Segment Decoding® reads crumpled, wrinkled or curved 1D barcodes.
  • DeBlur reads EAN and UPC codes with motion, lens or focus blur.
  • PDF417-LineSight® reads PDF417 barcodes with missing start or stop patterns and data columns.
  • AR Mode draws selectable overlays on detected barcodes.
  • Gallery scan decodes BMP, PNG and JPG images with ScanImage.
Enable the South African driving license parser in .NET MAUI →

Where the .NET MAUI plugin runs

Plugin.Maui.Barkoder brings the native barKoder engine to each MAUI target, so one C# codebase scans on phones, tablets and Windows devices.

Targets and requirements

  • Android, iOS and Windows from one NuGet package. The package also includes a Mac Catalyst build.
  • Minimum OS: Android 5.0 (API 21) and iOS 15.
  • Camera: at least 1280×720. Devices with an 8 MP autofocus camera are recommended.
  • iOS builds need a networked Mac, as with any .NET MAUI app.
  • Scanning runs on the device. The SDK goes online only for the license check, and each device must reach the licensing server at least once every 30 days.

Barcode types

1D barcodes

Codabar, Code 11, Code 25, Code 32, Code 39, Code 93, Code 128, GS1 DataBar, GS1 Composite, EAN-8, EAN-13, Interleaved 2 of 5, ITF-14, MSI Plessey, Postal Barcodes, Telepen, UPC-A, UPC-E and more.

2D barcodes

Aztec Code, Aztec Compact, Data Matrix, DotCode, MaxiCode, PDF417, Micro PDF417, QR Code and Micro QR Code.

See all supported barcode types →

Building a C# desktop or server application without MAUI? Use the barKoder Barcode Scanner SDK for C# or the barKoder Barcode Scanner SDK for Windows.

barKoder or ZXing.Net.MAUI?

ZXing.Net.MAUI is a free, MIT-licensed library, and many MAUI apps start with it. Both are installed from NuGet, so the choice comes down to what you scan and where.

ZXing.Net.MAUI is often enough when

  • You scan clean, printed QR codes and common 1D barcodes.
  • Occasional rescans of worn labels are acceptable.
  • A free, open-source license matters more than vendor support.
  • You don't need camera scanning on Windows. Its README says Windows barcode scanning isn't supported.

barKoder fits better when

  • Labels are damaged, wrinkled, blurred or engraved.
  • You need MRZ, VIN or PDF417 ID scanning with parsing on the device.
  • You need continuous scanning or Batch MultiScan with duplicate control.
  • You need camera scanning on Windows from the same package.
  • You want help during integration. Developer support is free for integration and testing.

magic5 moved its delivery and inventory scanning to barKoder after ZXing.NET became unreliable. Read how magic5 replaced ZXing.NET. Whichever you test, use the same samples and devices for both.

One scanning engine for .NET MAUI and every other stack

The engine behind Plugin.Maui.Barkoder also ships as native, web, desktop and cross-platform SDKs, so the same decoding runs wherever your C# app connects.

  • 7 native & desktop SDKs
  • 6 cross-platform integrations
  • One consistent scanning core

.NET MAUI teams scanning with barKoder in production

Industrial, automotive and logistics teams that moved their scanning to barKoder.

Tenaris

Luxembourg · Industrial field apps

Thousandsof VINs scanned in real-world field conditions

Integrated barKoder into the PipeTracer app suite, built with .NET MAUI, for phones and tablets with offline use in the field.

The SDK is robust, easy to maintain, and perfectly suited for industrial applications like ours.David Donayo, Tenaris
Read the story →

Club Assist

Australia · Battery fitment and testing apps

Replaced Cognexafter the vendor deprecated its SDK

Chose barKoder for VIN capture in two mobile apps because of its full .NET MAUI cross-platform support and its reads on damaged, low-contrast VIN labels.

The product works great, and we are very satisfied overall.Rich Dadisman, Club Assist
Read the story →

magic5

Great Britain · Logistics

Replaced ZXing.NETafter it became unreliable

Needed accurate scans for delivery records that may later face a recall, and a license that fit a small user base.

Fast, accurate scanning and very straightforward integration.Andrew Sinclair, Director, magic5
Read the story →

Try barKoder on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own barcodes before you integrate the SDK.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

.NET MAUI barcode scanner questions

Does the .NET MAUI barcode scanner work on Windows?

Yes. Plugin.Maui.Barkoder supports Android, iOS and Windows, and the NuGet package includes native Windows libraries for x64 and ARM64. You write the scanner once in C# and XAML and run it on all three targets.

How do I install the barcode scanner NuGet package?

Add Plugin.Maui.Barkoder to your project, register BarkoderViewHandler in MauiProgram.cs, add the camera permission on iOS and place a BarkoderView in your XAML page. The .NET MAUI installation guide walks through each step.

Is barKoder an alternative to ZXing.Net.MAUI?

Yes, and the setup is similar: a NuGet package, a camera view and a result callback. ZXing.Net.MAUI is free and open source. barKoder is a commercial SDK built for damaged, blurred and engraved barcodes, MRZ and VIN scanning, Batch MultiScan and Windows camera scanning. Test both on your own samples, then check barKoder pricing.

Can I scan passports and ID cards in a .NET MAUI app?

Yes. Enable the IDDocument barcode type to read the machine-readable zone of passports, ID cards and visas. The MRZ example for .NET MAUI also shows how to read the document, picture and signature images from the result. For field mapping, see the MRZ parser.

Does scanning need an internet connection?

Only for the license check. The SDK checks the license key with the barKoder licensing server when the app initializes it. All scanning runs on the device, and each device must reach the licensing server at least once every 30 days to keep returning licensed results.

Can I use BarkoderView with MVVM?

Yes. Any class can implement IBarkoderDelegate, so a view model can start scanning and receive results. Pass the BarkoderView to it, as shown in the MAUI pitfalls page.

Can the plugin read barcodes from photos in the gallery?

Yes. Pass a base64 image string to ScanImage to decode BMP, PNG or JPG files. See gallery scan for .NET MAUI.

How does the free trial work?

Get a key on the trial page or in the barKoder portal. A trial license lasts 30 days and can be deployed to up to 25 devices, and it is meant for development and staging. Without a license the SDK still scans, but results come back marked (Unlicensed) and only partly readable.

Add barcode scanning to your .NET MAUI app

Install Plugin.Maui.Barkoder and test it on your own barcodes and devices with a free 30-day trial, or talk to an SDK expert about your project.