Passport MRZ (TD3) Generator
MRZ fixtures for document-scanning and KYC testing
Generate a spec-shaped ICAO Doc 9303 TD3 machine-readable zone — the two 44-character OCR-B lines at the bottom of a passport's data page. Use it to test MRZ parsers, OCR pipelines, KYC and onboarding flows, travel-booking forms, and document-scanner SDKs without touching a real document. Line 1 carries the document code, issuing state, and name; line 2 carries the passport number, nationality, birth date, sex, and expiry date, each protected by its own check digit plus a final composite check digit.
Real math, fictional data
Check digits follow the Doc 9303 7-3-1 weighting over the A-Z/0-9/< character values, so parsers that validate them will accept these fixtures. Everything else is synthetic: names come from a small fixture list, dates are random, and the passport number is random — no line corresponds to any real person or issued document. The personal-number field is left as filler, as many real passports do.