MRZ Explained: What MRZ Is and How OCR Systems Recognize It
MRZ (machine-readable zone) is a two- or three-line code printed on identity documents. MRZ technology is used to make identity checks faster, more accurate, and less dependent on manual data entry in everyday workflows such as border control, car rental, and hotel check-in. Below, we explain what else the MRZ code is used for and how OCR technologies for its scanning have evolved over time.

Understanding the MRZ
Machine-readable zone stores personal key data as well as document information:
| Document holder’s data | Document details |
| Full name | Document type (e.g., “P” for passport) |
| Date of birth | Issuing country/authority |
| Sex/gender | Document number |
| Nationality | Expiration date |
Moreover, MRZ code contains a personal identification number sometimes required by issuing countries and verification check digits that validate the accuracy and authenticity of the data for the additional security.
MRZ technology is defined by ICAO (International Civil Aviation Organization) standards and uses the same font and Latin letters, numbers, and “<” symbols. Here are key ICAO-compliant MRZ code formats that appear globally on identity documents:
- TD1 (ID cards, residence permits): 3 lines, 30 characters each
- TD2 (ID cards, residence permits): 2 lines, 36 characters each
- TD3 or MRP (passports): 2 lines, 44 characters each
- MRVA (visas): 2 lines, 44 characters each
- MRVB (visas): 2 lines, 36 characters each
Nevertheless, MRZ is far more than just a machine-readable zone containing ID holder’s data as it also allows systems to access information in the NFC (RFID) chip, commonly used in biometric passports and other eIDs, already issued by more than 140 countries worldwide. This chip stores encrypted personal and biometric information and for complete security is protected by a cryptographic signature, which assures that it was issued by the legitimate authority and has not been altered since production.
MRZ technology also helps recognition systems verify document authenticity by checking its format and comparing its information with the VIZ (visual inspection zone). Since both MRZ and VIZ keep almost the same data, these sections must align perfectly for a document to be considered authentic. In fact, MRZ enables two core checks which are necessary for document data cross-validation:
- MRZ to VIZ comparison: verifies if name, ID document number, issuing state, and other information is identical in both zones. If not, OCR systems identify the document as forged.
- MRZ to NFC chip comparison: checks if the encoded in the chip information is the same as the MRZ data. In some forgeries, the MRZ is altered to duplicate the VIZ – that is why an NFC chip additional check is important.
Unlike the VIZ, meant for human inspection, and the RFID that requires electronic systems to access, the MRZ bridges both worlds, as it can be scanned and visually examined. But the way we read the MRZ code has transformed over the years.
The Shift from Optical Scanners to Mobile
The shift from specialized optical scanners to mobile devices has significantly changed the capture conditions, input quality, performance and security requirements of MRZ verification systems. The table below summarizes these differences:
| MRZ scanning in the 1980s through the early 2010s | MRZ scanning in the present day | |
| Devices used for the MRZ scanning | Stationary optical scanners | Smartphones, tablets, laptops, and any other devices |
| Typical input data | High-resolution scans | Photos or short videos from a mobile or web camera |
| MRZ recognition environments | Stable and controlled scanning conditions | Real-world conditions, often with shaky hands, uneven lighting, glare from holograms, and distorted angles |
| MRZ scanning accuracy | Approaching 100% by the late 1990s | Almost 100%, but only with the cutting-edge OCR systems |
Core Tasks and Challenges of MRZ Verification
MRZ verification focuses on two main tasks:
- Detection within a picture or video
- Character recognition
Currently, deep learning based models, such as HED-MRZ and YOLO-MRZ, are the most commonly used for these two tasks.
At the same time, there are OCR frameworks that extract text from images and convert it into machine-readable data. Despite their widespread use, not all OCR systems are equally suited for MRZ verification. The symbols in the MRZ are printed in a specialized OCR-B font, and the identity documents themselves are often laminated or made of polycarbonate for durability, which can cause glares and reflections that some recognition systems may struggle with.
Another challenge that complicates an MRZ-focused recognition system development is the severe lack of large-scale datasets of real identity document images and videos. Such data is private and highly sensitive which explains this shortage.
Choosing the Right Fit for MRZ Recognition
With OCR Studio’s flagship system OCR MRZ-scan, machine-readable zone scanning remains secure, fast, and reliable under any conditions. The technology was trained on large volumes of images and videos containing synthetic ID documents with no data belonging to real people. This approach helps avoid personal data processing risks while still delivering a highly accurate solution for organizations that need instant MRZ verification.
What is more, the solution is adapted in advance of the upcoming ICAO/ISO changes to the MRZ format in identity documents. The system supports IDs aligned with the current ICAO Doc 9303 MRZ specification along with the documents that are already following the revised standards. This allows banks, fintech companies, telecom operators, government agencies, and other regulated organizations to keep KYC and border-control workflows smooth throughout the transition period.
Taken together, MRZ is not just another textual field on a document – it should be viewed as a strategic trust layer for effective identity verification. The better an OCR solution scans and validates the MRZ data under real-world conditions, the less you have to rely on manual review and lose potential revenue by mistakenly rejecting legitimate customers. As remote KYC and onboarding continue to expand, making a well-informed choice of MRZ scanning technology is becoming increasingly important for businesses.