What the MRZ on your passport says — decoded and checked
The two lines of letters, digits and < signs at the bottom of a passport’s photo page are its machine-readable zone, or MRZ. This free MRZ checker decodes them: document type, issuing country, name, passport number, nationality, date of birth, sex, expiry date and the optional personal number. It also recalculates every check digit, so you can see at once whether a line was copied or scanned correctly.
It reads all the ICAO formats — TD3 passports (2 × 44 characters), TD1 ID cards (3 × 30), TD2 cards (2 × 36) and visas. The work happens in your browser; nothing is stored or sent. It is a checker only: it does not generate an MRZ, and a correct MRZ is not proof that a document is genuine.
How to use the MRZ Checker / Decoder
- Type or paste the MRZ lines into the box — or start with one of the ICAO specimens.
- Read the verdict: whether every check digit passes, and which format was detected.
- Look at the coloured lines to see where each field sits; a failing check digit is shown in red.
- Check the decoded fields and the check-digit table to find the character that is wrong.
- Press Clear when you are done, especially on a shared computer.
MRZ Checker / Decoder features
Every ICAO format
TD3 passports, TD1 and TD2 identity cards, MRV-A and MRV-B visas, detected from the line lengths.
All check digits
Document number, date of birth, expiry, personal number and the composite digit, with printed vs calculated values.
Colour-coded lines
Each field in its own colour, so you can match the MRZ to the visual page.
Long card numbers
TD1 document numbers longer than nine characters, which continue into the optional data, are handled.
Forgiving input
Lower case, spaces, « signs and a single pasted line are cleaned up for you.
Reading a passport MRZ code (TD3)
| Positions | Line 1 | Line 2 |
|---|---|---|
| 1–2 | Document type (P, often P<) | 1–9: passport number; 10: its check digit |
| 3–5 | Issuing state (e.g. IND, GBR, USA, D for Germany) | 11–13: nationality |
| 6–44 | Surname << given names, with < between words | 14–19: date of birth YYMMDD; 20: check digit |
| 21: sex (M, F or <); 22–27: expiry YYMMDD; 28: check digit | ||
| 29–42: personal number or optional data; 43: its check digit; 44: composite check digit |
How the 7-3-1 check digit works
Doc 9303 Part 3 turns each character into a number — 0–9 as themselves, A = 10 to Z = 35, and < = 0 — multiplies them by the repeating weights 7, 3, 1, adds the products and keeps the last digit of the total. For the specimen passport number L898902C3 the products are 147, 24, 9, 56, 27, 0, 14, 36 and 3; they add up to 316, so the check digit is 6 — exactly what the specimen prints after the number.
The composite digit at the end of a passport’s second line covers the document number, date of birth, expiry date and personal number together with their own check digits, so one wrong character usually shows up twice. That is how the checker points you to the field to correct.
Common reasons an MRZ fails
- O typed instead of 0 (or I instead of 1) in a number field — the MRZ font makes them look alike.
- A missing or extra <, which shifts every later field.
- Copying from a photo with OCR, which often reads < as K or « as two characters.
- Two-digit years: a birth year of 74 means 1974 and an expiry of 32 means 2032 — the checker decides by today’s date.
MRZ Checker / Decoder FAQ
What is the MRZ code on a passport?
The machine-readable zone: two lines of 44 characters at the bottom of the photo page holding your name, passport number, nationality, date of birth, sex and expiry date, plus check digits. Border scanners read it optically.
How do I check if my passport MRZ is correct?
Paste both lines into this MRZ checker. If every check digit passes, the characters were read consistently; a failing digit shows which field has a typo.
Does a valid MRZ mean the passport is real?
No. Check digits only catch reading and typing errors. Authenticity is checked by the issuing authority, the chip and the document’s security features.
Why does my name look different in the MRZ?
The MRZ uses only A–Z, so accents are removed or transliterated (Ö becomes OE or O), spaces become <, and long names are cut short at the end of the line.
Can it read ID cards and visas?
Yes — TD1 (3 lines of 30), TD2 (2 lines of 36) and machine-readable visas (MRV-A and MRV-B) as well as TD3 passports.
Is it safe to paste my passport details?
Nothing leaves your browser and nothing is saved, but avoid doing it on a shared computer, and clear the box when you finish.