The MRZ (Machine Readable Zone) is the block of letters, digits and chevrons printed across the bottom of a passport or ID card. It follows the ICAO 9303 standard: every field sits at a fixed position and most of them carry their own check digit. That is what makes it far more reliable to read than the styled text above it.
This guide covers how the MRZ is built, how a check digit is calculated, which misreads happen in practice, and how to get the data out without retyping it.
The three formats
| Format | Document | Lines × characters |
|---|---|---|
| TD3 | Passport | 2 × 44 |
| TD2 | Older ID cards, some residence permits | 2 × 36 |
| TD1 | Card-sized ID cards, residence permits | 3 × 30 |
On a passport (TD3), the first line carries the document type, the issuing state, and the surname and given names separated by chevrons. The second carries the document number, nationality, date of birth, sex, expiry date and personal number — most of them followed by a check digit, plus a composite check digit at the end of the line.
Want to see exactly which fields come off an ID card or passport? Upload one here and check it in seconds. No account, no card.
Drag your document or click to upload
PDF or image · max 2 pages
Free trial of up to 2 pages per document.
How a check digit is calculated
Three rules:
- 1Each character gets a value: digits keep theirs, letters A–Z count as 10–35, and the filler « < » counts as 0.
- 2Multiply by the weights 7, 3, 1, repeating in that order across the field.
- 3Add the results and take the remainder of division by 10. That is the check digit.
Take an expiry date of 300627 (27 June 2030): 3×7 + 0×3 + 0×1 + 6×7 + 2×3 + 7×1 = 21 + 0 + 0 + 42 + 6 + 7 = 76 → 6. If the digit printed after the date is not 6, the reading is wrong.
The misreads you actually see
- O and 0, I and 1, S and 5, B and 8. In an alphanumeric document number these are the classic OCR confusions. The number's own check digit catches them.
- Surname and given names swapped. In the MRZ the surname comes first, separated from the given names by two chevrons. Reading the printed text above often gets the order wrong.
- Dates in the wrong format. The MRZ uses YYMMDD, not DD/MM/YYYY. A date of birth of 3 April 1975 is
750403. - Accented characters. The MRZ has none: "Müller" becomes
MUELLER, "Doña" becomesDONA. That is the standard, not a misread. - A skewed photo or a glare. No check digit saves you there — retake the photo.
Reading an MRZ without retyping it
The reliable way to capture these fields is to let a machine do the arithmetic: decode the MRZ according to the standard, recalculate every check digit, and use only the values that add up.
That is what WhappScan does: from a photo it returns name, document number, date of birth, expiry and nationality, with the MRZ decoded in code — not by the AI — and its check digits verified. When the model's reading and the MRZ disagree, the verified value wins.
Try it on your own document: the passport and ID scanner is free, needs no signup and handles up to three documents a day.
What the MRZ does not do
Decoding an MRZ is not identity verification. The zone confirms the data is internally consistent, not that the document is genuine or that the person presenting it is its holder — that is a separate, often regulated check. For accommodation, the rules differ by country: see guest registration in Europe by country.
Sources
Need to extract data from a document right now?
Try it free in seconds — no account, no card. Upload an invoice or document and get the data instantly.
Try it free