How to Read the Machine-Readable Zone on a Passport

If you have ever looked at the bottom of a passport's photo page, you have seen two
lines of evenly-spaced capital letters, numbers, and chevrons (<). That block is
the Machine-Readable Zone (MRZ) — a standardized, machine-friendly copy of the
holder's key details, defined by ICAO Document 9303.
It exists so that any reader — a border kiosk, a hotel scanner, or an API — can extract identity data reliably, without depending on fonts or layout.
What the two lines encode
A standard passport (TD3 format) MRZ has two lines of 44 characters:
- Line 1 — document type, issuing country, and the holder's name (surname,
then given names, separated and padded with
<). - Line 2 — passport number, nationality, date of birth, sex, expiry date, an optional personal number, and a set of check digits.
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L898902C36UTO7408122F1204159ZE184226B<<<<<10
Tip
Dates are written YYMMDD. So 740812 is 12 August 1974, and 120415 is
15 April 2012. The single letter after the date (F/M/X) is the sex field.
Check digits: the MRZ's built-in error detection
The MRZ is not just data — it is self-verifying. Several fields are followed by a
check digit computed from the characters before it, using a weighting pattern of
7, 3, 1 repeated across the field. A final composite check digit covers the whole
second line.
This is why MRZ extraction can reach near-perfect accuracy: even if OCR misreads a character, the check digits usually catch it. A document where the check digits do not validate is an immediate red flag — it often signals a tampered or fabricated passport.
Why it matters for verification
Two reasons:
- Accuracy. The MRZ gives a clean, structured source of truth for name, number, nationality, date of birth, and expiry — independent of the visual zone, which can be harder to read on a worn or low-light capture.
- Authenticity. Cross-checking the MRZ against the visual zone (and validating the check digits) is one of the strongest, cheapest fraud signals available. If the printed name says one thing and the MRZ says another, something is wrong.
ID Analyzer decodes the MRZ automatically wherever one is present — and falls back to full visual-zone OCR when it is not (for example, on many driver's licenses, which use barcodes instead).
So the next time you see those two cryptic lines, you will know: they are a compact, checksum-protected snapshot of an identity — built to be read by machines, and to make forgery harder.



