Read Barcodes
using IronBarCode;
using IronSoftware.Drawing;
using System.Drawing;
using System.IO;

// Reading a barcode is easy with IronBarcode

// From an image file (also supports JPEG, TIFF, BMP, etc.)
var resultFromFile = BarcodeReader.Read(@"file/barcode.png");

// From a Bitmap object
var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp"));

// From a IronSoftware.Drawing.AnyBitmap object
var resultFromAnyBitmap = BarcodeReader.Read(new AnyBitmap("barcode.bmp"));

// From an Image object
var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg"));

// From a memory stream
MemoryStream imageMemoryStream = new MemoryStream();
var resultFromStream = BarcodeReader.Read(imageMemoryStream); // From a stream

// PDFs are more intricate and must be read using ReadPdf
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf");
Imports IronBarCode
Imports IronSoftware.Drawing
Imports System.Drawing
Imports System.IO

' Reading a barcode is easy with IronBarcode

' From an image file (also supports JPEG, TIFF, BMP, etc.)
Dim resultFromFile = BarcodeReader.Read("file/barcode.png")

' From a Bitmap object
Dim resultFromBitMap = BarcodeReader.Read(New Bitmap("barcode.bmp"))

' From a IronSoftware.Drawing.AnyBitmap object
Dim resultFromAnyBitmap = BarcodeReader.Read(New AnyBitmap("barcode.bmp"))

' From an Image object
Dim resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg"))

' From a memory stream
Dim imageMemoryStream As New MemoryStream()
Dim resultFromStream = BarcodeReader.Read(imageMemoryStream) ' From a stream

' PDFs are more intricate and must be read using ReadPdf
Dim resultFromPdf = BarcodeReader.ReadPdf("file/mydocument.pdf")
NuGet Download
PM > Install-Package BarCode
Read Barcodes

Read Barcodes

Reading barcodes using IronBarcode is effective and simple. IronBarcode supports various formats and has different methods for each situation. Whether you are a developer looking to read barcodes from images or a developer who needs to integrate a barcode application and manipulate the data, IronBarcode has you covered.

Barcode Reader in C#

With the BarcodeReader.Read method, developers can pass along the file path of any standard image formats such as png, jpg, and jpeg to quickly read the values within the file. Furthermore, the BarcodeReader.Read method works for Bitmap and AnyBitmap. This is ideal for applications that require manipulating or passing values using the standard Bitmap class. For developers needing a universally compatible Bitmap format across .NET 8, .NET Core, and .NET Framework, the AnyBitmap class offers a platform-agnostic solution. It enables seamless cross-compatibility, allowing you to write flexible code and pass variables without any obstructions.

The BarcodeReader class also has specific methods for reading barcodes from a PDF using ReadPdf to read barcodes from every image embedded in the PDF document, allowing developers to quickly obtain all barcodes.

Aside from the specified methods, the BarcodeReader methods allow developers to pass in the BarcodeReaderOptions for more fine-grain control and customization. This applies to every method within the BarcodeReader class, enabling options such as reading only the first barcode to save time, reading specific types of barcodes, and utilizing multithreading, among other customization options.

Explore our guide on reading barcodes from images in C#.
View on GitHub

Ready to Get Started?

Nuget Downloads 2,472,280Version:2026.10just released