IRONSOFTWAREHOME
.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;
}
Imports IronQr
Imports IronSoftware.Drawing

' OnScanButtonClicked method triggered by the scan button
Private Async Sub OnScanButtonClicked(ByVal sender As Object, ByVal e As EventArgs)
    ' Open the device image picker
    Dim images = Await FilePicker.Default.PickAsync(New PickOptions With {
        .PickerTitle = "Pick image",
        .FileTypes = FilePickerFileType.Images
    })
    Dim imageSource = images.FullPath.ToString()

    ' Load the selected image into AnyBitmap
    Dim inputBmp = AnyBitmap.FromFile(imageSource)

    ' Load the asset into QrImageInput
    Dim imageInput As New QrImageInput(inputBmp)

    ' Create a QR Reader object
    Dim reader As New QrReader()

    ' Read the input and get all embedded QR Codes
    Dim results As IEnumerable(Of QrResult) = reader.Read(imageInput)

    ' Display the first result
    resultLabel.Text = "Scanned Text: " & results.First().Value
End Sub
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 74,386Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required