MRZ Calculator
All posts
MRZICAO 9303Basics

Understanding the MRZ: A Practical Intro to ICAO 9303

What the Machine Readable Zone actually encodes, why it's printed in OCR-B, and how border systems read it in milliseconds.

6 min read
Stylised passport machine readable zone with glowing OCR-B characters

The Machine Readable Zone (MRZ) is the strip of evenly spaced characters at the bottom of passports, ID cards, and visas. It exists for one reason: machines need to read identity documents quickly and consistently across every country in the world.

Why a standard was needed

Before ICAO Doc 9303, every issuer printed information in its own layout. Border agents had to recognize dozens of formats, and automated systems were essentially impossible. ICAO 9303 fixed the field order, character set, line length, and validation rules — so a scanner built in one country can read a document from any other.

The character set

MRZ uses only A–Z, 0–9, and the filler character "<". This restricted alphabet is what allows the use of OCR-B, a typeface designed for optical character recognition. Each glyph has the same width, so a camera can slice each line into fixed boxes.

What's encoded

  • Document type and issuing state
  • Holder's name (surname, then given names)
  • Document number, nationality, date of birth, sex, expiry
  • Optional issuer-defined data
  • Check digits guarding each field and the composite block

Once you can read those fields, the rest is just layout: TD1 has three lines, TD2 and TD3 have two, and visas (MRV-A / MRV-B) reuse the visa-specific structure.

Try it yourself

Validate, generate, and convert MRZ lines with the in-app tools.

Keep reading

All posts