Question 14

What is a check digit in the MRZ and how is it calculated?

A check digit is a single digit embedded in the MRZ that's mathematically derived from another piece of data, like the document number or date of birth, and it exists specifically to catch errors or tampering. The idea is straightforward: if you know the formula used to generate a check digit from a given data field, you can take the data as read by a scanner, run it through that same formula, and compare your result to the check digit that's actually printed.

If they match, the data is internally consistent. If they don't, something is wrong, either the data was misread, or the document has been altered.

The ICAO 9303 standard specifies exactly how these check digits are calculated. Each character in a relevant data field is assigned a numeric value (digits keep their value, letters are mapped to numbers, and the filler character < counts as zero), and those values are multiplied by a repeating sequence of weights, 7, 3, and 1, then summed and reduced to a single digit using modulo 10 arithmetic.

Several individual fields get their own check digit this way, document number, date of birth, expiry date, and there's also a composite check digit at the end of the MRZ that's calculated across a combination of fields, providing an additional layer of validation on top of the individual ones.

This matters enormously for fraud detection. If someone tries to alter a date of birth on a stolen or forged passport without recalculating the corresponding check digit correctly, the mismatch shows up immediately during automated scanning.

Getting every affected check digit right after an alteration requires understanding the exact ICAO algorithm, which is a meaningfully higher bar than simply changing printed text, making the MRZ a genuinely useful anti-tampering feature rather than just a data-encoding convenience.

For a business, this is one of the more valuable things automated document scanning does that a human eyeballing a passport simply can't replicate. A person can't mentally recompute a modulo-10 weighted checksum while looking at a document, but software can do it instantly.

ScanDoc runs these check-digit validations as a standard part of MRZ processing, flagging any mismatch so a business can route that document to manual review rather than accepting it automatically.

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.