Passport MRZ Decoder

Decoder

Decode and validate a passport MRZ (TD3, 2 lines of 44 characters). Parses every field and verifies all 5 ICAO 9303 check digits, reporting exactly which one fails. Currently supports TD3 passports only.

Paste MRZ (2 lines)
Paste a 2-line MRZ above, or load the ICAO example, then click "Decode"

Need test MRZ data instead?

This tool decodes and validates an existing MRZ. To generate fresh, check-digit-valid test data, use our MRZ Generator →

About this tool

About the Passport MRZ Decoder

This tool parses the Machine Readable Zone (MRZ) of a passport — the ICAO Doc 9303 TD3 format printed as two 44-character lines at the bottom of the photo page — and independently verifies each of its 5 check digits. It reports exactly which fields decode correctly and which check digit (if any) fails, rather than a single pass/fail result.

Paste the two MRZ lines (with or without a line break between them) and the decoder extracts the document type, issuing state, name, passport number, nationality, date of birth, sex, expiry date, and personal number. It then recomputes the check digit for the passport number, date of birth, expiry date, and personal number individually, plus the composite check digit covering the wider field range, and compares each to the value printed in the MRZ.

Use this decoder to debug why an MRZ produced by an OCR or document-scanning pipeline is failing downstream validation, to manually verify a passport's MRZ against the printed data as a sanity check, or to learn the exact field layout and checksum rules of the ICAO 9303 TD3 format.

All parsing and checksum verification happens locally in your browser — no MRZ data is ever transmitted or stored. The algorithm is verified against the official ICAO 9303 specimen document (Utopia / ERIKSSON ANNA MARIA) and cross-checked with this site's own MRZ Generator across hundreds of round-trip tests.

Key Features

  • Parses ICAO Doc 9303 TD3 (2-line, 44-char) passport MRZ
  • Independently verifies all 5 check digits (passport number, DOB, expiry, personal number, composite)
  • Reports exactly which check digit fails, with the expected vs. actual value
  • Decodes name, nationality, sex, and dates with century inference for 2-digit years
  • Built-in ICAO specimen example to try instantly
  • 100% browser-based, no data sent

FAQ

MRZ Decoder — Frequently Asked Questions

What format does this decoder accept?

TD3 only — the 2-line, 44-character-per-line format used on passport photo pages. Paste both lines, either on separate lines or as one continuous 88-character string; the tool detects either form. ID-card formats (TD1/TD2) are not supported yet.

How does the tool resolve the 2-digit year in dates of birth and expiry?

MRZ dates only store a 2-digit year, which is inherently ambiguous. For date of birth, the tool assumes the most recent century that doesn't place the birth date in the future — correct for essentially any real passport holder. For expiry, it assumes the 2000s, since the TD3 format has been in wide global use since then; very old specimens may not resolve correctly.

One check digit fails but the rest pass — what does that mean?

Each of the 5 check digits (passport number, date of birth, expiry date, personal number, and the composite) is verified independently. A single failing check digit usually points to a transcription error in that specific field — for example, if only the date-of-birth check digit fails, double-check those 6 digits and their check digit against the source document.

Can this tool confirm a passport is genuine?

No. It only verifies that the MRZ's internal arithmetic is self-consistent. A passport can have a perfectly valid MRZ checksum and still be counterfeit, expired, or reported lost — confirming authenticity requires checking the physical security features and, for border authorities, the issuing country's live records.

Tips

  • Click "Load ICAO Example" to see the tool decode the official ICAO Doc 9303 specimen document
  • The tool accepts the two lines with or without a line break between them
  • Lowercase input is automatically converted to uppercase before decoding
  • Use the MRZ Generator on this site to create fresh, fully valid test data for OCR or KYC pipelines

Explore more

Related Tools

Other tools that might be useful for your workflow