Read QR Code Value
using IronQr;
using System.Drawing;

// Import image
var inputImage = Image.FromFile("sample.jpg");

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

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

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

// Display the value of the first QR code found
Console.WriteLine($"QR code value is {results.First().Value}");
NuGet Download
PM > Install-Package IronQR
Read QR Code Value

Read QR Code Value

Easily extract the QR code's content as a ready-to-use string, allowing you to immediately display the value to a user, save it to a database, or pass it to another function. IronQR reads the embedded data from any image using QrReader.Read() and exposes it through the Value property on each QrResult.

5-step guide for reading a QR code value

  • using IronQr;
  • QrImageInput imageInput = new QrImageInput(Image.FromFile("sample.jpg"));
  • QrReader reader = new QrReader();
  • IEnumerable<QrResult> results = reader.Read(imageInput);
  • Console.WriteLine(results.First().Value);

Code Explanation

An image containing a QR code is loaded from disk and wrapped in a QrImageInput object, which tells IronQR what to scan. A QrReader instance processes the input and returns a collection of QrResult objects, one per QR code found in the image. Calling .Value on a result gives the decoded string directly, whether that is a URL, a product ID, or any other encoded text.

Explore How to Read QR Code Values with IronQR.

Ready to Get Started?

Nuget Downloads 80,612Version:2026.11just released