Question 16

How does MRZ scanning work step by step?

MRZ scanning follows three broad stages: capture, extraction, and validation, each handled automatically in a well-built system.

Capture comes first. A camera or dedicated scanner takes an image of the document, positioned so the MRZ is visible and in focus.

This could be a passport reader at an airport gate, a smartphone camera during a remote account signup, or a fixed scanner at a hotel front desk. The system needs a clear enough image to distinguish individual characters, though modern software tolerates a fair amount of variation in angle, lighting, and document condition compared to older, stricter scanning hardware.

Extraction is next. OCR software processes the captured image specifically looking for the MRZ's characteristic layout, two or three lines of the fixed-pitch OCR-B font, and reads each character.

Because the format is standardized, the software already knows which character positions correspond to which fields. It doesn't need to guess that characters 6 through 14 represent the date of birth, because ICAO 9303 defines that layout in advance.

The output at this stage is a raw string of characters that gets parsed into structured fields: name, document number, nationality, date of birth, expiry date, and so on.

Validation is the final stage. The system recalculates the check digits embedded in the MRZ using the ICAO algorithm and compares them to what's printed.

It also, in a properly designed process, cross-references the extracted MRZ data against the visual zone (the human-readable text elsewhere on the document) and against any barcode or chip data available. Any mismatch, a failed check digit, a name that doesn't match between MRZ and visual zone, gets flagged rather than silently accepted.

The entire sequence typically completes in well under a couple of seconds on modern hardware, which is what makes MRZ-based scanning practical for high-volume settings like airport check-in or bank account onboarding, where waiting even ten seconds per customer would create real bottlenecks.

ScanDoc's scanning flow follows exactly this three-stage structure, with the added step of running OCR on the visual zone in parallel so the two data sources validate each other automatically, rather than treating MRZ as a standalone check that has to be trusted on its own.

Talk to a document scanning specialist

Have a specific integration question, or want to see how this fits your onboarding flow? The ScanDoc team is happy to help.