GdPicture.NET is a Nutrient product. Learn more

MRZ OCR for ID cards, driver licenses, visas, and passports

Extract and decode machine readable zone (MRZ) data from travel documents and identity cards with AI-powered OCR technology. Automate passport verification, visa processing, and ID validation with fast, accurate extraction of holder information, document numbers, and expiration dates — even from poor-quality scans and photos.



What is a machine readable zone — MRZ OCR

The machine readable zone (MRZ) is a standardized text area on passports, visas, ID cards, and driver licenses that enables automated data extraction using OCR technology. Encoded with OCR-B font according to ICAO Document 9303, and ISO/IEC 7501-1 standards, MRZ contains mandatory holder information and document details in a machine-readable format for fast identity verification at border control, airports, and security checkpoints.

Machine readable zone illustration

MRZ characters

Extract structured data from MRZ including:


  • Type of ID document
  • Issuing state
  • Document number
  • Name of the holder
  • Date of birth
  • Sex
  • Date of expiry of the document
  • Nationality of the holder
  • Additional optional information

Standardized MRZ formats

Support for all international MRZ standards:


  • TD1 (ID card, passport card)
  • TD2 (passport)
  • TD3 (passport)
  • MRV-A (visa)
  • MRV-B (visa)

There are also other specific formats depending on the country. For instance, French and Portuguese ID cards don’t follow these standards.


Highlights

MRZ recognition capabilities are included in the GdPicture.NET OCR SDK.

Robust MRZ detection

Extract MRZ data from challenging images with AI-powered OCR accuracy. Handles small or distant text, motion blur, partial occlusion, skewed documents, and poor lighting conditions. Processes mobile phone captures and low-quality scans without manual preprocessing — eliminating deskewing and image correction steps.

Document coverage

Supports all international machine readable travel documents (MRTD), including passports, national ID cards, enhanced driver licenses, visas, and resident permits. Extract data from 100+ document types across all countries for KYC/AML compliance, identity verification, hotel check-in automation, and customer onboarding in banking and financial services.

Format agnostic

The detector is agnostic and doesn’t decode (recognize/OCR) the text to check it against some predefined rules (regex), which means it supports all MRZ types (Travel Documents 1/2/3, MRVA, MRVB) regardless of the font, content, shape, or country.

Get started

How to use

Download and install the GdPicture.NET package to access compiled demo applications and multi-language sample projects with full source code.

Explore demo apps
Find compiled demo applications in \Samples\Bin\.
Explore multi-language source code
Find C# and VB.NET demo apps and source code in \Samples\WinForm\.
Visit reference guide
Explore other code snippets within the online reference guide.

Example of usage

The example converts a document with MRZ to a searchable PDF.

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
using GdPictureImaging gdpictureImaging = new GdPictureImaging();
using GdPictureOCR gdpictureOCR = new GdPictureOCR();
// Select the image to process.
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.png");
// Set the OCR parameters.
gdpictureOCR.SetImage(imageID);
gdpictureOCR.ResourceFolder = @"C:\GdPicture.NET 14\Redist\OCR";
gdpictureOCR.AddLanguage(OCRLanguage.English);
// Run the OCR process.
string resID = gdpictureOCR.RunOCR();
// Get the result of the OCR process as text.
string content = gdpictureOCR.GetOCRResultText(resID);
// Save the result in a PDF document.
gdpicturePDF.CreateFromText(PdfConformance.PDF, 595, 842, 10, 10, 10, 10,
TextAlignment.TextAlignmentNear, content, 12, "Arial", false, false, true, false);
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");
gdpictureImaging.ReleaseGdPictureImage(imageID);

Trusted by 3,000+ customers and Fortune 500 companies

15Y+
More than 15 years of experience developing our SDK
10K+
Trusted by more than 10,000 developers


Frequently asked questions

What is the machine readable zone (MRZ) on identity documents?

The machine readable zone (MRZ) is a standardized text area found on passports, visas, ID cards, and other travel documents. It contains encoded information about the document holder in a format that can be quickly read by optical character recognition (OCR) systems, enabling automated identity verification at border controls and security checkpoints.

Which MRZ formats are supported by the GdPicture.NET MRZ OCR SDK?

The SDK supports all international MRZ standards, including TD1 (ID cards, passport cards), TD2 (passports), TD3 (passports), MRV-A (visas), and MRV-B (visas). It also handles country-specific formats that don’t follow standard specifications.

How does the SDK handle poor-quality or skewed images?

The SDK uses AI-powered OCR technology to extract MRZ data from challenging images. It handles small or distant text, motion blur, partial occlusion, skewed documents, and poor lighting conditions without requiring manual preprocessing or deskewing steps.

What information can be extracted using the MRZ OCR SDK?

The SDK extracts document type, issuing state, document number, holder’s name, date of birth, sex, document expiry date, nationality, and additional optional information encoded in the MRZ.

Is the GdPicture.NET MRZ OCR SDK compliant with international standards?

Yes. The SDK fully complies with ICAO Document 9303 and ISO/IEC 7501-1 standards for machine readable travel documents (MRTDs).

Can the MRZ OCR SDK process images captured from mobile devices?

Yes. The SDK processes mobile phone captures and low-quality scans effectively, making it ideal for mobile identity verification, customer onboarding, and field applications.

What are the typical use cases for it?

Common use cases include KYC/AML compliance, identity verification, hotel check-in automation, customer onboarding in banking and financial services, border control, airport security, and visa processing.

Does the GdPicture.NET MRZ OCR SDK support multithreaded processing?

Yes. The SDK supports multithreaded processing, enabling high-throughput applications that can process up to 30 IDs, passports, or driver licenses per second.

Is GdPicture’s MRZ engine the same one used in Nutrient’s web and mobile SDKs?

Yes. GdPicture.NET belongs to the Nutrient product family, and the machine-readable zone technology is shared across Nutrient’s desktop, web, and mobile SDKs, enabling consistent identity document parsing on all platforms.

60-day free trial

Try GdPicture.NET now!