C# Data Matrix Barcode Reader Library
How to read Data Matrix in C# ASP.NET, MVC, Windows apps?

C#.NET Data Matrix Barcode Reader for .NET, C#, ASP.NET & VB.NET
Barcode Reader for C#.NET library > How to read, scan barcodes using C#? > Scan, read, recognize Data Matrix barcode image in C#


  • Fully written in Visual C#.NET 2.0
  • Consistent with .NET 2.0, 3.0, 3.5 and later version
  • Have fast reading speed
  • Support reading distorted Data Matrix barcode images
  • Read Data Matrix barcodes from all angles
  • Scan multiple Data Matrix barcodes in a single image file
  • Support GIF, JPEG, PNG & TIFF formats
This tutorial shows you how to integrate and use the KeepAutomation Data Matrix Reader SDK in your .NET projects. You will learn how to install the library, read barcodes from images, extract detailed properties, and decode ASCII, Unicode, binary, and GS1 data.

The KeepAutomation C# Data Matrix Reader SDK is a high-performance barcode recognition library for the .NET platform. It supports both linear and 2D barcode scanning in Visual Studio .NET applications.

Download Data Matrix .NET Barcode Reader
Users are free to download trial version of KA.Barcode Reader for .NET. Once the trial version of this barcode reader is unzipped, you will find:
  • KeepAutomation.BarcodeReader.dll
  • End user license agreement
  • User manual
  • Order page
Pay attention: The trial version of our .NET barcode reader decodes the first character of a barcode symbology randomly. So please purchase our applicable license if you want to use it for other applications.
.NET Data Matrix Barcode Reader User Manual
  1. Add reference KeepAutomation.BarcodeReader.dll to your project.
  2. Use the following C# & VB demo codes below.
C# Sample code
     using KeepAutomation.BarcodeReader;
String[] datas = BarcodeReader.readBarcode("C:\barcode.jpeg", BarcodeType.DataMatrix);
VB Sample code
     Imports KeepAutomation.BarcodeReader  
Dim datas As [String]() = BarcodeReader.readBarcode("C:\barcode.jpeg", BarcodeType.DataMatrix)




Extract Data Matrix Barcode Properties in C#

You can retrieve detailed barcode information using the BarcodeDetail and DataMatrixProps classes.

Available Properties
  • FormatMode: The encoding format used
  • DataMode: The Data Matrix barcode data encoding mode
  • IsStructuredAppend: Indicates if the barcode uses structured append
  • SymbolPosition: Position index in a structured append group
  • SymbolCount: Total number of barcodes in the group
  • FileID: File identifier value (1 - 254)


Decode & Parse Data Matrix Data in C#

The library supports multiple data types for decoding in WinForms, WPF, and web applications.


Decode ASCII Characters

Use GetASCIITextMessage() to extract standard text values.


Decode Unicode Text

Retrieve raw bytes and convert using UTF8 encoding.



Decode Binary Data

Extract raw byte data directly from the barcode.


Decode GS1 Data Messages

Enable GS1 parsing to read structured GS1 Data Matrix barcodes.
  1. Create a ScanOptions object
  2. Set EnableGS1 = true
  3. Check IsGS1Compitable to confirm GS1 format
  4. Use GetMessage() to retrieve formatted GS1 data


The KeepAutomation C# Data Matrix Reader SDK provides reliable decoding for all .NET environments. You can easily integrate it into VB.NET, WinForms, WPF, ASP.NET, and console applications. The library supports standard, Unicode, binary, and GS1 data formats for full flexibility.


Summary

  • Simple DLL integration for all .NET project types
  • Fast scanning from common image formats including multi-page TIFF
  • Detailed property extraction for Data Matrix barcodes
  • Full support for ASCII, Unicode, binary, and GS1 data decoding
  • Clean, consistent API for C# and VB.NET development








Frequently Asked Questions

Can you define a Data Matrix code?

It is a type of two-dimensional barcode that encodes data in a pattern of black and white cells, usually organized as a square. Using KeepAutomation C# Barcode Reader SDK, you can scan, decode Data Matrix code from barcode image files in C# ASP.NET, MVC, Blazor, Windows Forms, WPF applications.

What is the ISO standard governing Data Matrix?

The technology is standardized under ISO/IEC 16022, which was last revised and reaffirmed in 2024. C# Barcode Scanner library fully support Data Matrix ISO standard, which will scan, read standard Data Matrix from image files in Visual Studio .NET projects.

Is it possible to scan a Data Matrix code?

Yes. Use a scanner app installed on your iPhone or Android phone to scan and decode Data Matrix codes from images. Using KeepAutomation C# Data Matrix Barcode Reader library, you can easily scan, decode Data Matrix code from barcode image files in C# class.

Is a Data Matrix code resistant to damage?

Yes. While Data Matrix barcodes can get damaged, ECC200 Data Matrix uses Reed-Solomon error correction. A Data Matrix using the common ECC 200 standard can sustain damage to up to 50% of its pattern and remain scannable because of its advanced error correction. C# Data Matrix Scanner library supports reading and scanning partial damaged Data Matrix images, and return verified Data Matrix codes in C# web and desktop applications.

How do you retrieve GS1 data from a Data Matrix?

Yes. A standard barcode scanner can read the code, but the output must be processed by a system that understands, Data Matrix codes with encoded GS1 data need to follow GS1's specifications. and separates the GS1 data formats to make the information usable. The system must not only read the barcode but also decode it according to GS1 rules to correctly extract the structured information like batch numbers and expiration dates. KeepAutomation C# Data Matrix Barcode Reader library supports both ISO standard and GS1 standard Data Matrix scanning and decoding in your C# ASP.NET Core, WinForms web and Windows applications.