.NET MAUI QR Code Scanner
using IronQr;
using IronSoftware.Drawing;

// OnScanButtonClicked method triggered by the scan button
private async void OnScanButtonClicked(object sender, EventArgs e)
{
    // Open the device image picker
    var images = await FilePicker.Default.PickAsync(new PickOptions
    {
        PickerTitle = "Pick image",
        FileTypes = FilePickerFileType.Images
    });
    var imageSource = images.FullPath.ToString();

    // Load the selected image into AnyBitmap
    var inputBmp = AnyBitmap.FromFile(imageSource);

    // Load the asset into QrImageInput
    QrImageInput imageInput = new QrImageInput(inputBmp);

    // Create a QR Reader object
    QrReader reader = new QrReader();

    // Read the input and get all embedded QR Codes
    IEnumerable<QrResult> results = reader.Read(imageInput);

    // Display the first result
    resultLabel.Text = "Scanned Text: " + results.First().Value;
}
NuGet Download
PM > Install-Package IronQR
.NET MAUI QR Code Scanner

.NET MAUI QR Code Scanner

Use IronQR to scan QR codes in a .NET MAUI mobile application. Pick an image from the device library with FilePicker.Default.PickAsync, load it using AnyBitmap.FromFile, and decode it with QrReader.Read. Works on Android and iOS from a single shared codebase.

5-step guide for building a MAUI QR code scanner

  • using IronQr;
  • using IronSoftware.Drawing;
  • var images = await FilePicker.Default.PickAsync(new PickOptions { FileTypes = FilePickerFileType.Images });
  • var inputBmp = AnyBitmap.FromFile(images.FullPath.ToString();
  • IEnumerable<QrResult> results = reader.Read(imageInput);

Code Explanation

FilePicker.Default.PickAsync opens the native image picker on the current platform, filtered to image types. The selected file's full path is retrieved with images.FullPath.ToString() and passed to AnyBitmap.FromFile, which loads it into a bitmap regardless of format. A QrImageInput wraps that bitmap so IronQR can work with it, and QrReader.Read returns an IEnumerable<QrResult>. First().Value extracts the decoded string from the first result.

Explore the Full .NET MAUI QR Code Scanner Tutorial with IronQR.

Ready to Get Started?

Nuget Downloads 80,612Version:2026.11just released