Passport MRZ and OCR test data: marked specimen passports with ground truth
The machine-readable zone (MRZ) is the two-line code at the bottom of a passport’s data page. GritWorks offers visibly marked specimen passports for testing MRZ and passport OCR, clean and blurred, with JSON ground truth for both MRZ lines and the printed fields so you can check parsing and cross-field consistency.
A passport data page uses the TD3 format: two lines of 44 characters. Line 1 holds the document type, issuing state and the name, surname first, with < as filler. Line 2 holds the document number, nationality, date of birth, sex, expiry date and optional data, each number followed by a check digit, and a final composite check digit.
Testing MRZ vs visual-zone consistency
The JSON records both MRZ lines and the printed fields (passport number, names, nationality, date of birth, sex, issue and expiry dates). A parser should decode the MRZ, validate every check digit, and confirm that the decoded values agree with the visual zone. On the specimen they all do, so any mismatch is a reading error.
Blur and photocopy: where MRZ OCR fails
The passport has a strong-blur copy and the passport card a photocopy. In the MRZ, blur turns < fillers into K or C, merges 0 and O, and shifts characters so a line is no longer 44 long. Check digits catch many of these errors, which is exactly what a test should confirm.
Specimen marking and responsible use
Every identity document in the pack is visibly marked as a specimen and is not valid identification. The set exists to test MRZ and OCR software with fictional data; it must never be presented as a real travel document.
Passport card included
The kit also holds a passport card for the same fictional person, the wallet-size card format. Its printed fields (card number, names, nationality, date of birth, place of birth, issue and expiry dates) are annotated for visual-zone OCR testing.
FROM THE PACK’S GROUND-TRUTH JSON
Fields with ground truth
Every annotated field in the 2 documents, with one example value. Repeated rows such as line items are shown once. Identifier values are withheld from this page and stay in the pack.
These documents ship in the US KYC pack: 10 PDFs, five clean and five degraded, with structured JSON and bounding boxes. Enter your name, email and company and we’ll email the link. No call or platform account is required for the sample.
The sample is a starting point. We can support the volume your project needs. Book a call to discuss your document types, languages, formats and target volume.
We also provide Excel spreadsheets and images in JPEG, PNG and TIFF formats. Qualified teams can receive the full PDF dataset free after the booking form and call.
The free offer covers PDFs. Larger volumes and other formats are scoped on the call. Product support is available around GritWorks products.
QUESTIONS
Passport MRZ test data, answered.
Are these real passports?+
No. They are fictional specimens, visibly marked as not valid for identification, built to test MRZ parsing and passport OCR.
Do the MRZ check digits validate?+
Yes. The document number, date of birth, expiry date, optional-data and composite check digits on the specimen’s MRZ are computed correctly, so a parser’s validation logic has a known pass case. Introduce errors yourself to test the fail path.
Can these documents pass identity verification?+
No. They are marked specimens with no security features, for testing data capture and parsing. Authenticity checks, liveness and chip reading need their own test data and acceptance criteria.
Which countries are covered?+
The free sample has US-format specimens. Specimens for other countries, always visibly marked, can be scoped on a call.
How do I get the sample?+
Choose “Email me this pack” and enter your name, email and company. We’ll email the download link. No call or platform account is required for the sample.
Can I use my own tools?+
Yes. Use the PDFs and reference files in your own evaluation, sandbox or testing workflow. The included reference data is not an automated scoring system. The sample pack is licensed CC BY 4.0: you may use, adapt and share it, including commercially, with attribution to GritWorks. Third-party names or logos that appear in some documents belong to their owners and are not covered by the license.