Free telecom & identity tools · runs in your browser
Free tool
MRZ Generator & Parser
Build or decode the machine-readable zone on passports, ID cards and visas — TD1, TD2, TD3, MRV-A and MRV-B per ICAO Doc 9303 — with full check-digit verification and a printable specimen document.
MRZ Generator
Pick a format and fill in the details. Every check digit — including the composite, where the format has one — is calculated for you.
Every MRZ and specimen document this tool produces is synthetic test data. Check digits are genuinely valid, but document numbers are not issued by any government and belong to no real person. The specimen is watermarked SPECIMEN and is not a travel document.
How a passport MRZ (TD3) is structured
A passport's machine-readable zone is two lines of 44 characters. Taking the ICAO specimen L898902C36UTO7408122F3404159ZE184226B<<<<<16 as an example of the second line:
| Digits | Segment | Meaning |
|---|---|---|
| L898902C3 | Document number | The passport number, padded with < to 9 characters, followed by its own check digit. |
| 6 | Check digit | A check digit over the document number alone. |
| UTO | Nationality | ICAO 3-letter country code — UTO is the fictional specimen state used in Doc 9303’s own examples. |
| 740812 | Date of birth | YYMMDD, each date followed by its own check digit. |
| ZE184226B<<<<< | Optional data | Free text at the issuing state’s discretion — often a national personal number. |
| 16 | Composite check digit | One further check digit computed over several non-contiguous ranges of the line above, covering the document as a whole. |
The first line carries the document code, issuing state and name in the same SURNAME<<GIVEN<NAMES convention used by every ICAO format. TD1 and TD2 follow the same design with different field widths, and TD1 uniquely spreads its fields across three lines rather than two. MRV-A and MRV-B — the visa formats — carry the same three per-field check digits but no composite check digit at all.
Why generate test MRZ data?
Any system that reads travel or identity documents — border kiosks, KYC onboarding, hotel and telecom registration, airline check-in — needs realistic MRZ strings to test against: the parser logic, the check-digit maths, the name-truncation rules, and the physical scanner reading a printed page.
Using a real passport or ID number in a test environment risks exposing genuine personal data. Synthetic MRZs that are structurally and arithmetically correct let you exercise the same code paths — field extraction, date parsing, checksum verification, barcode and OCR scanning — without any real document ever entering your test systems.
