What is MRZ? A Complete Guide to Machine-Readable Zones

What is MRZ? A Complete Guide to Machine-Readable Zones

You have seen it thousands of times — two lines of cramped capital letters and numbers at the bottom of a passport data page. That strip is the MRZ: the Machine-Readable Zone. It is the foundation of virtually every automated border crossing, hotel check-in scanner, banking KYC system, and identity verification SDK in operation today.

Yet despite being one of the most widely deployed standards in global travel and identity infrastructure, few people can explain precisely what MRZ is, what it contains, or why it works the way it does. This guide gives you a complete, authoritative answer — from the definition and history through format specifications, check digit mechanics, scanning technology, and real-world use cases.

MRZ Definition: What is a Machine-Readable Zone?

A Machine-Readable Zone (MRZ) is a region on a travel document or identity card that contains encoded personal and document data printed in a standardized font and layout, specifically designed to be captured and parsed by optical character recognition (OCR) scanners without human keying.

The MRZ encodes the same core information that appears in the Visual Inspection Zone (VIZ) — the human-readable portion of the passport — but in a tightly structured, fixed-length format that software can decode in milliseconds with near-perfect accuracy. Every MRZ field occupies a predetermined position within the string, and dedicated check digits embedded in the zone verify data integrity after scanning.

MRZ is defined and standardized by the International Civil Aviation Organization (ICAO) under Document 9303: Machine Readable Travel Documents. This standard is accepted by 193 member states, making MRZ the most universally deployed identity data encoding standard on Earth.

What Does MRZ Stand For?

MRZ stands for Machine-Readable Zone. The name is straightforwardly descriptive: it is the zone on a document that machines read. The abbreviation is used interchangeably with the full term across border control systems, KYC platforms, identity SDKs, regulatory guidance, and ICAO documentation.

You may also encounter the following related abbreviations in technical documentation:

  • MRTD — Machine Readable Travel Document (the document itself, e.g., a passport)
  • VIZ — Visual Inspection Zone (the human-readable portion of the data page)
  • OCR-B — The specific font in which MRZ characters are printed
  • ICAO 9303 — The governing ICAO standard that defines MRZ specifications
  • TD1 / TD2 / TD3 — Document type categories that determine MRZ format and size

A Brief History of MRZ Technology

The MRZ was conceived in the early 1980s as international air travel expanded rapidly and manual passport inspection at busy airports created dangerous bottlenecks. The ICAO established a technical advisory group to create a standardized, machine-readable format that any country's border system could read without bilateral data-sharing agreements or custom integrations.

The first edition of ICAO Doc 9303 was published in 1980, defining the TD3 format for passports. By the mid-1980s, major international airports began deploying optical passport readers at primary inspection lines. The standard expanded over subsequent decades to cover ID cards (TD1), visas (MRVA, MRVB), and eventually incorporated specifications for the NFC chip layer in biometric e-passports (introduced from 2004 onward).

Today, the seventh edition of ICAO 9303 (published in 2015 and updated since) remains the definitive global reference. The MRZ format has changed very little from the original 1980 specification — its stability is a deliberate feature, ensuring backward compatibility across systems deployed over four decades.

MRZ Document Types: TD1, TD2, TD3, MRVA, and MRVB

ICAO 9303 defines several document type categories, each with a specific MRZ format. The document type (TD) designation determines the physical size of the document and the structure of the MRZ zone.

TD3 — Passport Booklets

The most widely known MRZ format. TD3 is used for standard passport booklets and defines a two-line MRZ, each line 44 characters long (88 characters total). Every international passport issued today uses TD3. The format encodes document type, issuing state, holder name (line 1), and passport number, nationality, birth date, sex, expiry date, optional data, and composite check digit (line 2).

TD1 — ID Cards and Residence Permits

Used for ID cards, residence permits, and other credit-card-sized travel documents. TD1 defines a three-line MRZ, each line 30 characters long (90 characters total). Many European national ID cards, US Permanent Resident Cards (Green Cards), and similar documents use TD1. The extra line accommodates optional national data fields that don't fit in the two-line format.

TD2 — Smaller Travel Documents

A less common format for official travel documents smaller than a passport but larger than an ID card. TD2 uses a two-line MRZ, each line 36 characters long (72 characters total). Some EU member states have used TD2 for official identity cards and refugee travel documents.

MRVA and MRVB — Visa Stickers

Machine-Readable Visas (MRV) are affixed into passport booklets as stickers. MRVA is the standard full-width visa format (two lines of 44 characters), while MRVB is a smaller format (two lines of 36 characters) used when the visa sticker occupies only part of a passport page. Schengen Area visas, UK visas, US visas, and most other international visa stickers conform to one of these formats.

MRZ Format: What Do the Characters Mean?

Understanding MRZ format requires knowing that every character in the zone has a designated position and meaning. There are no variable-length fields — each field occupies exactly the same positions in every document of the same type. Filler characters (the less-than sign, <) pad fields that are shorter than their allocated length.

Here is the field breakdown for a TD3 passport MRZ:

Line 1 (positions 1–44)

  • Positions 1–2: Document type. "P" in position 1 denotes a passport. Position 2 is used for document subtype (e.g., "PO" for official passport, "PD" for diplomatic). Filler (<) if no subtype.
  • Positions 3–5: Issuing state or organization code. Three-character ISO 3166-1 alpha-3 country code (e.g., "GBR" for United Kingdom, "USA" for United States, "DEU" for Germany).
  • Positions 6–44: Holder's name. Primary identifier (surname) followed by two filler characters (<<), then secondary identifiers (given names separated by single < characters). All remaining positions padded with <.

Line 2 (positions 1–44)

  • Positions 1–9: Passport number. Alphanumeric, padded with <.
  • Position 10: Check digit for passport number.
  • Positions 11–13: Nationality code (ISO 3166-1 alpha-3).
  • Positions 14–19: Date of birth in YYMMDD format.
  • Position 20: Check digit for date of birth.
  • Position 21: Sex. "M" (male), "F" (female), or "<" (unspecified/other).
  • Positions 22–27: Expiry date in YYMMDD format.
  • Position 28: Check digit for expiry date.
  • Positions 29–42: Optional data field. Contents vary by issuing state; may include national ID number, visa number, or other national identifiers. Padded with < if unused.
  • Position 43: Check digit for optional data field.
  • Position 44: Composite check digit. Computed over the concatenated string of passport number + check digit + nationality + DOB + check digit + expiry + check digit + optional data + check digit.

How MRZ Check Digits Work

MRZ check digits are a critical integrity mechanism. They are computed values that verify that a scanned MRZ field has been read correctly and that the data has not been altered. A check digit mismatch is an immediate red flag that requires human review or rejection of the document.

The check digit algorithm is defined in ICAO 9303 Part 3 and works as follows:

  • Each character in the field being checked is assigned a numeric value: digits 0–9 have their face value; letters A–Z have values 10–35; the filler character < has value 0.
  • Each character's value is multiplied by a weighting factor that cycles through the sequence 7, 3, 1 repeatedly from left to right.
  • The products are summed, and the check digit is the sum modulo 10 (i.e., the remainder when divided by 10).

For example, if a passport number is "L898902C3", you compute: L=21×7, 8=8×3, 9=9×1, 8=8×7, 9=9×3, 0=0×1, 2=2×7, C=12×3, 3=3×1. Sum = 147+24+9+56+27+0+14+36+3 = 316. 316 mod 10 = 6. The check digit is 6.

The composite check digit on line 2, position 44, covers a wider string concatenating multiple fields and their individual check digits, providing an end-to-end integrity check across the entire critical data set. If any field in that composite has been altered — even by a single character — the composite check digit will be wrong.

Check digits do not prevent forgery, but they immediately detect OCR errors and crude alterations. Combined with the cryptographic protections in e-passport NFC chips, they form a layered integrity architecture.

The OCR-B Font: Why MRZ Is Printed the Way It Is

MRZ characters are printed in OCR-B, an ISO-standardized typeface (ISO 1073-2:1976) designed specifically for optical character recognition. OCR-B was engineered so that individual characters are maximally distinguishable from one another — eliminating the visual ambiguities between similar-looking letters and digits (0 vs O, 1 vs l vs I, 5 vs S) that cause recognition errors in standard fonts.

OCR-B characters are monospaced, have specific stroke widths, and are printed at a defined pitch and size. The MRZ is always printed in black ink on a light background, in a defined zone at the bottom of the data page, with machine-readable dimensions. This uniformity is what allows optical scanners and software cameras to reliably locate and read the MRZ regardless of which of 193 countries issued the passport.

The MRZ zone itself is also deliberately positioned away from the photograph, personal data fields, and decorative security background printing, reducing the chance of OCR interference from surrounding visual elements.

How MRZ Scanning Works

Scanning an MRZ involves three stages: image capture, zone detection, and character recognition and parsing.

1. Image Capture

The document is photographed — either by a dedicated passport reader device, a flatbed scanner, or (in mobile apps) by a smartphone camera. Image quality requirements are well-defined in ICAO 9303: adequate resolution, minimal blur, sufficient contrast between the dark OCR-B text and the light background, and correct orientation. Modern MRZ SDKs include real-time image quality guidance to prompt the user to reposition the document or improve lighting before capture.

2. MRZ Zone Detection

The software locates the MRZ zone within the captured image. This is typically done using a combination of edge detection, line detection algorithms, and trained machine learning models that recognize the characteristic layout of the two- or three-line MRZ strip. The detection must handle perspective distortion (the document not lying perfectly flat), slight rotation, and varying distances from the camera.

3. Character Recognition and Parsing

Once the MRZ zone is isolated, OCR processes each character line. Because the font (OCR-B) and character set (uppercase letters, digits, and < only) are fixed, OCR accuracy on MRZ text reliably exceeds 99.9% under good conditions with a well-calibrated model. After recognition, the raw character strings are parsed according to the field positions defined in ICAO 9303, check digits are verified, and structured data (name, document number, DOB, expiry, nationality) is extracted and returned.

High-quality MRZ scanner SDKs accomplish the entire three-stage pipeline in under 200 milliseconds on a standard smartphone — fast enough to feel instantaneous to a user holding their passport in front of a camera.

What Data Does an MRZ Contain? — Full Field Reference

Here is a complete reference of the data fields an MRZ encodes, applicable across TD3, TD1, and TD2 formats (with minor variations in optional field usage):

  • Document Type: Single or two-character code indicating whether the document is a passport (P), official passport (PO), diplomatic passport (PD), travel document (TD), etc.
  • Issuing State Code: Three-letter ISO 3166-1 alpha-3 country code of the issuing authority.
  • Surname: The holder's family name(s) as recorded on the document.
  • Given Names: The holder's given name(s), separated by filler characters in the MRZ string.
  • Document Number: The unique alphanumeric identifier of the specific document (passport number, ID card number). Up to 9 characters.
  • Nationality: Three-letter ISO 3166-1 alpha-3 nationality code of the holder.
  • Date of Birth: Six-digit YYMMDD. Two-digit years are interpreted in context (e.g., 26 = 2026 or 1926 depending on expiry).
  • Sex: M, F, or < (unspecified).
  • Expiry Date: Six-digit YYMMDD expiry date of the document.
  • Optional Data: Country-specific field. Used for national ID numbers, visa reference numbers, personal numbers (used in Scandinavian passports), or left blank.
  • Check Digits: Computed values for passport number, date of birth, expiry date, optional data, and a composite check digit covering all critical fields.

What the MRZ does not contain: the holder's photograph, address, biometric data, or the digital signature of the issuing authority. Those live in the NFC chip (for e-passports) or in the VIZ. The MRZ is a concise, integrity-protected summary of the document's key identity fields — sufficient for most automated verification use cases without requiring chip access.

MRZ vs. NFC Chip: Two Layers of the Same Document

Since 2004, most passports issued by ICAO member states include an embedded NFC (Near Field Communication) chip alongside the MRZ. The MRZ and the NFC chip are not competing technologies — they are complementary layers of the same document that serve different verification purposes.

  • MRZ is optically read using a camera. It is fast, requires no specialist hardware beyond a camera, works on any device with an image sensor, and extracts the core identity fields in milliseconds. It does not require any network access or chip interface.
  • NFC chip stores the same core data digitally, plus the holder's high-resolution photograph (Data Group 2), optional fingerprints (DG3), and a cryptographically signed Document Security Object (SOD). It is accessed by touching the passport to an NFC-capable reader. It requires NFC hardware and chip access protocols (BAC or PACE).

The MRZ actually serves as the key to unlock the NFC chip. The chip's Basic Access Control (BAC) mechanism derives an encryption key from the MRZ data (specifically the document number, date of birth, and expiry date) — meaning you must read the MRZ before you can access the chip. This design prevents passive eavesdropping: someone cannot read a passport chip from a distance without first physically reading the MRZ.

For detailed comparison of these two data extraction methods, see MRZ vs. Full-Page OCR: What Actually Gets Extracted from a Passport Scan.

MRZ Use Cases: Where Machine-Readable Zones Are Used

MRZ is one of those technologies that underpins dozens of different industries and workflows without most end users ever knowing it exists.

Border Control and Immigration

Every automated border gate (e-gate) and primary inspection lane at international airports uses MRZ scanning as the first step in processing a traveller. The MRZ is read in under a second, the data is cross-referenced against watchlists and entry records, and the traveller is either cleared or flagged for secondary inspection — all before the officer has finished looking up from their screen.

KYC and Banking Onboarding

Banks, neobanks, payment platforms, and crypto exchanges use MRZ scanning as the core of remote identity verification under Know Your Customer (KYC) regulations. The user photographs their passport, the MRZ is read and parsed, and the extracted fields are verified against external databases and the document's own check digits. MRZ scanning provides structured, verified identity data that is far more reliable than manually typed fields.

Hotel and Hospitality Check-In

Hotels in most countries are legally required to record passport details for international guests. Dedicated hotel passport scanners and mobile check-in apps use MRZ scanning to capture this data in seconds, replacing the laborious (and error-prone) process of manually copying document numbers. MRZ-captured data feeds directly into property management systems without manual re-keying.

Healthcare and Patient Identification

Hospitals and healthcare providers increasingly use MRZ scanning to enrol patients, verify identity across care settings, and support cross-border healthcare access. MRZ data provides a standardized, internationally recognized identifier that works even when patients speak different languages or come from different countries.

Telco SIM Registration

Many countries require mobile operators to verify customer identity before activating a SIM card. MRZ scanning is the most efficient mechanism for this, enabling in-store staff or customers themselves to complete identity capture in seconds through a smartphone app rather than manual data entry.

Car Rental and Shared Mobility

Rental car companies, car-sharing platforms, and ride-hailing services that need to verify driver licence or passport identity at scale use MRZ-based scanning to automate the identity capture step, reducing counter time and eliminating transcription errors.

Travel and Visa Applications

Online visa application portals and travel booking platforms use MRZ scanning to autofill application forms. Rather than requiring applicants to type their passport details (introducing transcription errors), the platform prompts them to scan the MRZ and populates all fields automatically.

MRZ Accuracy: What Affects Reading Quality?

MRZ scanning accuracy is very high under optimal conditions, but several factors can degrade it:

  • Low image resolution: If the camera captures the MRZ below approximately 300 DPI effective resolution, character recognition quality drops.
  • Motion blur: A moving document or unsteady hand during capture blurs the fine OCR-B characters.
  • Poor lighting or glare: Reflective laminate over the MRZ zone, or strong directional lighting, can wash out characters or create glare that obscures portions of the text.
  • Document wear and physical damage: A heavily used passport may have MRZ characters that are partially worn, stained, or folded — especially in documents approaching their expiry date.
  • Perspective distortion: A passport held at a sharp angle rather than flat creates keystoning that distorts character proportions.

Modern MRZ SDKs address these factors with real-time guidance overlays (instructing users to hold the document flat, improve lighting, or move closer), adaptive preprocessing pipelines that correct for common degradations, and neural network recognition models trained on tens of millions of real passport scans. The best commercial SDKs achieve field-level accuracy above 99.5% across real-world conditions.

MRZ Security: Can It Be Forged?

MRZ is a security-enhanced but not cryptographically secure zone. This distinction matters for understanding what MRZ alone can and cannot verify.

What MRZ check digits detect:

  • Scanning errors (character misread by OCR)
  • Simple field alterations (changing a digit in the document number or date of birth)
  • Transcription errors during manual data entry

What MRZ check digits do not detect:

  • A completely forged document where both the data and check digits were computed for the forged values
  • A genuine passport that has been reported lost/stolen and is being used by a different person
  • A document issued with fraudulent underlying data (i.e., the issuing authority was deceived)

For this reason, MRZ scanning in high-security contexts is always combined with additional layers: liveness detection and face matching (confirming the person presenting the document is its holder), database cross-referencing (checking the document number against Interpol's Stolen and Lost Travel Documents database), and — for maximum assurance — NFC chip authentication (providing cryptographic proof that the document is genuine and unaltered).

The physical document also carries security features invisible to a standard camera — holographic laminates, UV-reactive inks, microprinting, guilloche patterns, and laser perforation — that a comprehensive passport SDK analyzes to detect sophisticated forgeries.

Glossary of Key MRZ Terms

For quick reference, here are the key terms used when working with MRZ technology:

  • MRZ (Machine-Readable Zone): The strip of encoded OCR-B text at the bottom of a travel document's data page, containing structured personal and document data.
  • MRTD (Machine Readable Travel Document): Any travel document — passport, ID card, visa — that contains an MRZ.
  • ICAO 9303: The International Civil Aviation Organization's standard defining MRZ formats, field specifications, check digit algorithms, and e-passport chip requirements.
  • TD1 / TD2 / TD3: Document type categories that define the physical size and MRZ format (three-line 30-char, two-line 36-char, two-line 44-char respectively).
  • OCR-B: The ISO-standardized monospaced font used to print MRZ characters, designed for reliable optical character recognition.
  • Check Digit: A computed numeric value embedded in the MRZ that verifies the integrity of specific fields. Computed using a weighted modulo-10 algorithm.
  • VIZ (Visual Inspection Zone): The human-readable portion of the passport data page — the printed name, photo, document number, etc. — as distinct from the machine-readable MRZ.
  • BAC (Basic Access Control): The e-passport chip access protocol that uses MRZ-derived keys to establish an encrypted NFC session.
  • PACE (Password Authenticated Connection Establishment): The modern, more secure replacement for BAC in newer e-passports.
  • Passive Authentication: The cryptographic verification process that confirms e-passport chip data has not been altered since issuance.
  • MRVA / MRVB: Machine-Readable Visa formats — full-width (MRVA) and half-width (MRVB) visa sticker MRZ formats.
  • Filler Character (<): The less-than symbol used to pad MRZ fields to their fixed length when the actual data is shorter.
  • Optional Data Field: A 14-character field in the TD3 MRZ (positions 29–42 of line 2) used for national data such as personal numbers, with usage varying by issuing country.

How MRZ Fits Into Modern Identity Verification

MRZ scanning is the entry point for almost every document-based identity verification flow. It is fast, reliable, universally supported across 193 countries' documents, and requires nothing more than a camera. But in modern identity verification architecture, MRZ is one layer in a multi-step process:

  1. MRZ Scan: Extract structured identity data and verify check digit integrity.
  2. Document Authenticity Check: Analyze security features (holograms, UV patterns, microprinting) to confirm the physical document is genuine.
  3. NFC Chip Verification (for e-passports): Use the MRZ-derived key to access the chip, run Passive Authentication to verify cryptographic integrity, and optionally run Chip Authentication to confirm the chip is not a clone.
  4. Biometric Face Match: Compare the chip-sourced or VIZ photograph against a live selfie with liveness detection, confirming the person is the document holder.
  5. Database Cross-Reference: Screen the document number and personal data against watchlists, PEP/sanctions databases, and stolen document registries.

MRZ without these additional layers provides identity data extraction, not identity verification. The distinction is important: extraction tells you what is printed on the document; verification tells you whether the document is genuine and whether the person presenting it is its rightful holder.

For businesses evaluating which MRZ scanning solution best fits their verification needs, see Top 5 MRZ Readers SDK in 2026 for a comparison of the leading commercial options.

Frequently Asked Questions About MRZ

What does MRZ stand for?

MRZ stands for Machine-Readable Zone. It is the strip of encoded text printed at the bottom of a passport's data page (and on some ID cards and visas) that can be read by optical scanners and software to instantly extract the document holder's identity data.

What information is stored in an MRZ?

An MRZ on a passport (TD3 format) contains: document type, issuing country code, holder's full name, passport number, nationality, date of birth, sex, expiry date, optional national data field, and check digits for data integrity verification.

How many lines does an MRZ have?

It depends on the document type. Passports (TD3) have 2 lines of 44 characters each. ID cards (TD1) have 3 lines of 30 characters each. TD2 documents have 2 lines of 36 characters each. Visas (MRVA) have 2 lines of 44 characters; MRVB has 2 lines of 36 characters.

Is MRZ the same as a barcode?

No. MRZ is optical character recognition (OCR) text — it is human-readable printed characters using the OCR-B font. A barcode encodes data in a pattern of lines or squares that humans cannot read directly. Both are machine-readable, but they use completely different technologies and serve different purposes.

Can MRZ data be faked or tampered with?

MRZ data includes check digits that validate the integrity of key fields — if printed data is altered, the check digit will not match, flagging the document. In e-passports, the NFC chip also stores the MRZ data cryptographically signed, making undetected tampering extremely difficult. However, a completely fabricated document with correctly computed check digits for the fraudulent data will not be caught by check digit verification alone — additional layers (NFC authentication, database checks) are needed for robust fraud detection.

Which standard governs MRZ?

MRZ is defined by ICAO Document 9303: Machine Readable Travel Documents, maintained by the International Civil Aviation Organization. All 193 ICAO member states issue travel documents conforming to this standard, making MRZ the universal baseline for cross-border identity document scanning.

Conclusion

MRZ — the Machine-Readable Zone — is one of the most consequential identity standards ever deployed, yet it is almost invisible to the people whose documents carry it. Two lines of OCR-B text at the bottom of a passport data page encode a complete, integrity-verified identity record that border systems, banks, hotels, and identity platforms around the world can read in milliseconds.

Understanding MRZ — what it stands for, what it contains, how its check digits work, what its document type categories mean, and where it sits in the broader identity verification stack — is foundational knowledge for anyone building or evaluating systems that process travel documents. Whether you are a developer integrating a passport scanning SDK, a compliance officer defining a KYC workflow, or a product manager assessing identity verification options, MRZ literacy is the starting point.

From this definition, the natural next questions are how MRZ compares to other extraction methods and which SDK handles it best at production scale. For both, the answers are in the related guides: MRZ vs. Full-Page OCR and Top 5 MRZ Readers SDK in 2026.