How to check a passport’s MRZ

  1. Find the MRZ. It is the block of monospaced capitals at the bottom of the passport data page (two lines of 44) or on the back of an ID card (three lines of 30). Each < is a filler, not a typo.
  2. Type or paste the lines. One line per row, exactly as printed. If you are copying from an OCR result, keep the < characters; the tool fixes lower case and stray spaces for you.
  3. Read the verdict. A green verdict means every check digit matches. A red one lists which digit fails and what was expected, so you can find the misread character.
  4. Check the decoded fields. Compare the decoded name, number and dates against the printed data page. A mismatch between the two zones is a reason to look closer.

What it does

  • Verifies every ICAO Doc 9303 check digit: document number, date of birth, date of expiry, optional data and the composite digit
  • Handles the three travel-document formats — TD3 passports (2 × 44), TD1 ID cards (3 × 30), TD2 documents (2 × 36) — plus MRV-A and MRV-B visas
  • Decodes the document code, issuing state, surname and given names, number, nationality, sex, dates and optional data
  • Flags OCR confusions (0/O, 1/I, 8/B, 5/S) and, where a swap makes the check digit pass, suggests the corrected value
  • Shows the full field-position table for every format, with a link to the ICAO part that defines it
  • Runs entirely in your browser: no upload, no storage, no network request — the lines are gone when you reload

What does an MRZ checker actually verify?

It cuts each line into the fields ICAO Doc 9303 defines for that format, recomputes every check digit from the characters it covers, and compares the result with the digit that is printed. A passport (format TD3) has five check digits: document number, date of birth, date of expiry, optional data, and a composite digit over most of the second line. An ID card (TD1) has four, a TD2 document four, and a visa (MRV) three — visas carry no composite digit. The tool then decodes what the fields say: document code, issuing state, surname and given names, nationality, sex and both dates.

Why do passports have check digits at all?

Because the zone is meant to be read by a scanner, and scanners make mistakes. A check digit lets the reading software notice that a 0 came through as an O, or that a line was cut one character short, before the data goes anywhere. It is an integrity check on the text, not a security feature: anyone can compute the digits, and the standard publishes the algorithm. That is also why a passing result says nothing about whether a document is genuine.

Which characters does OCR get wrong?

The OCR-B font used in the MRZ was designed to keep characters apart, but phone cameras, glare and laminate still produce a short list of regular confusions. The tool checks for them in both directions.

PrintedOften read asWhere it shows up
0 (zero)ODates, check digits, document numbers
1I or LDates, check digits
8BDates, numbers
5SDates, numbers
2ZDates, numbers
< (filler)Dropped, or read as « or KNames and the padding after every field — a missing filler shifts every later field

A letter inside a numeric field is always wrong, so the tool reports it and tries the digit look-alike; if that makes the check digit pass, it says so. A digit inside the name field is likewise flagged with the letter it probably was.

How are the two-digit years turned into dates?

The MRZ stores dates as YYMMDD with no century. The checker assumes a birth year is in the past (a year up to the current one is read as 20YY, otherwise 19YY) and an expiry year is 20YY unless that would be more than twenty years ahead, in which case it is 19YY. The decoded dates carry a note saying so. For a person born in 1926 or a document that expired decades ago the assumption can be wrong; the raw six characters are shown next to each date so you can judge.

What can’t it tell you?

It cannot see the photo, the chip, the laminate or the watermark, so it cannot say a document is real. It does not know every three-letter code: the list covers ISO 3166 countries and the codes ICAO reserves (D for Germany, GBR and the other British codes, XXA to XXC for stateless persons and refugees, UNO), and an unknown code is shown as is with a note. It reads text, not images, so a photo of a passport has to go through OCR first. And it does not keep anything: the lines live in your browser’s memory for as long as the page is open.