Passport MRZ Generator

Generator

Generate ICAO Doc 9303 TD3 passport MRZ (machine readable zone) test data with valid check digits — for testing OCR, KYC, and travel-document scanning software. Currently supports TD3 passports only.

Document Options
Generated MRZ
Click "Generate MRZ" to create test data
Sponsored

Travel insurance built for nomads

Comprehensive medical and travel coverage wherever you go. No long-term commitment required.

Coverage in 185+ countries
Cancel or pause anytime
Home country coverage included

Want to verify an existing MRZ instead?

This tool generates fresh test MRZ data. To decode and validate an MRZ you already have, use our MRZ Decoder →

About this tool

About the Passport MRZ Generator

This tool generates the Machine Readable Zone (MRZ) of a passport's identity page in the ICAO Doc 9303 TD3 format — the 2-line, 44-character-per-line block printed at the bottom of every modern passport and read by airport e-gates, KYC onboarding scanners, and OCR pipelines. Every check digit is computed correctly, so the output is a fully valid, self-consistent specimen document.

Choose an issuing state, surname, given names, sex, date of birth, and expiry date, and optionally include the 14-character personal number field. The generator builds the name field (SURNAME<<GIVEN<NAMES, padded with filler characters to 39 characters), transliterates any accented or non-ASCII characters to plain A-Z as ICAO 9303 requires, and computes all 5 check digits — for the passport number, date of birth, expiry date, personal number, and the final composite check digit covering the other fields — using the official weighted 7-3-1 checksum.

Use this generator to produce realistic test fixtures for passport OCR and MRZ-parsing pipelines, to populate KYC/identity-verification test environments without using a real document, or to explore how the ICAO 9303 MRZ format is structured field by field.

Every document is generated and encoded entirely in your browser — nothing is transmitted or stored. The algorithm is verified against the official ICAO 9303 specimen document (Utopia / ERIKSSON ANNA MARIA) and round-trip tested against this site's own MRZ Decoder.

Key Features

  • ICAO Doc 9303 TD3 (2-line, 44-char) passport format
  • All 5 check digits computed correctly (passport number, DOB, expiry, personal number, composite)
  • Automatic A-Z transliteration of names (no diacritics, per ICAO 9303)
  • Configurable issuing state, sex, dates, and optional personal number
  • Field-by-field breakdown table for every generated document
  • Verified against the official ICAO specimen and this site's MRZ Decoder
  • 100% browser-based, no data sent

FAQ

Passport MRZ Generator — Frequently Asked Questions

What is the MRZ on a passport?

The Machine Readable Zone is the block of OCR-B characters at the bottom of a passport's photo page, standardized by ICAO Doc 9303. It encodes the same identity data printed above it — name, document number, nationality, date of birth, sex, and expiry date — plus check digits, so it can be read reliably by a scanner instead of a person typing it in.

How are the MRZ check digits calculated?

Each character is assigned a value (0-9 for digits, 10-35 for A-Z, 0 for the filler character '<'), multiplied by a repeating weight of 7, 3, 1, and summed; the check digit is that sum modulo 10. Four check digits cover the passport number, date of birth, expiry date, and personal number individually, and a fifth composite check digit covers a specific combination of those fields plus their own check digits.

Does this tool only support passports (TD3)?

Yes, currently only the TD3 format (2 lines of 44 characters, used on passport photo pages) is supported. TD1 (3-line ID-card format) support is planned but not yet implemented.

Is the generated document a real, usable passport number?

No. This tool generates fictitious but check-digit-valid MRZ data for testing purposes only — the document numbers are random and are not assigned to any real person, government database, or issued travel document.

Tips

  • Paste the two generated lines directly into the MRZ Decoder to see every check digit verified independently
  • Names are automatically transliterated to A-Z with '<' as a space/filler — accented letters are converted to their closest plain equivalent
  • Leave the personal number field unchecked to generate the more common format without it
  • The default dates are randomized on each page load — adjust them directly if you need a specific age or expiry window

Explore more

Related Tools

Other tools that might be useful for your workflow