Free tool
Sample MRZ generator
Enter whatever fields you like and get both lines of a TD3 MRZ with every check digit computed. Use them as test data for your parser without photographing anyone’s passport.
Generation runs in your browser: no request is sent, nothing is stored, and no account is needed.
Optional. Many countries leave it empty.
Fill in the fields and generate the MRZ.
What a sample MRZ is for
Anyone integrating passport reading needs test data, and the obvious test data is real passports: the team’s, a customer’s, whatever an image search turns up. None of those is a good option, and all of them are avoidable, because the MRZ is an open format that can simply be constructed.
This tool assembles both lines of a TD3 MRZ — the passport-book format — with all five check digits computed per ICAO 9303. The result passes any correct reader, ours included, so it works as a positive test case.
The MRZ prints only A-Z, 0-9 and the filler «<», so names are transliterated: accents are dropped, apostrophes are omitted, and hyphens and spaces become «<». Where a value does not fit the space the standard assigns it, it is truncated. Both of those are reported under the result rather than done silently.
What these lines are not is an authentic document. The MRZ carries no cryptographic signature: check digits catch a mistranscribed character, they do not forge or attest to anything. Use the output as test data, never as proof of identity.
Does the generated MRZ pass validation?
Yes. All five check digits are computed with the same code our validator and our API use, so any ICAO 9303 conformant reader accepts it.
Why did my name come back without its accents?
Because the MRZ allows only A-Z, digits and the filler «<». It is the same transliteration a real passport performs: María Muñoz is printed MARIA<MUNOZ.
What happens if my surname is very long?
The name field is 39 characters, counting surname, given names and separators. If the name does not fit, it is truncated starting from the given names — which is what a real passport does too — and we say so.
Does it work for documents that are not passport books?
No. This generates TD3 MRZs, two lines of 44 characters, which is the passport-book format. Identity cards use TD1 and TD2, with a different field layout.
More free tools
MRZ Validator
Paste the two MRZ lines and verify their ICAO 9303 check digits.
Passport Validity Checker
Check whether a passport satisfies the six-month rule for a given trip.
Check digit calculator
Compute the 7-3-1 check digit for one MRZ field and see the arithmetic.
ICAO country codes
Look up which country — or which other thing — a three-letter MRZ code names.