Free tool
MRZ check digit calculator
Paste a passport number, a date, or any other MRZ field and get its ICAO 9303 check digit — with every multiplication and the running sum on screen, so you can line your own implementation up against ours instead of guessing where it diverges.
The calculation runs in your browser: no request is sent, nothing is stored, and no account is needed.
Letters A-Z, digits 0-9 and the filler character «<». Spaces are ignored.
Or take a field from the ICAO 9303 specimen passport:
Enter an MRZ field to see the calculation.
What an MRZ check digit is
The machine-readable zone of a passport carries five check digits: one over the passport number, one over the date of birth, one over the date of expiry, one over the personal number, and a composite one covering all of the others. They exist to catch a misread character, not to authenticate the document.
The method has been unchanged for decades and is public: every character takes a value (0-9 for digits, 10-35 for A through Z, 0 for the filler «<»), gets multiplied by 7, 3 or 1 according to its position in the field, the products are summed, and the check digit is that sum modulo 10.
That arithmetic is what the table above shows. The point of seeing all of it is not to obtain the number — any library gives you that — but to find the exact place where your implementation parts company with ours. It is nearly always a letter’s value, or the weights failing to restart every three characters.
One caveat about the personal number: ICAO allows its check digit to be printed as «<» when the field itself is entirely filler. Our MRZ validator accepts either form; this calculator always returns the figure, because the figure is what is being calculated.
Which MRZ fields carry a check digit?
The passport number, the date of birth, the date of expiry, the personal number, and a composite digit covering all four along with their own digits. Nationality, sex and the name field carry none.
Do the weights restart for each field?
Yes. The 7-3-1 sequence begins again at the first character of every field; it does not continue from the previous one. This is the most common mistake when implementing the algorithm.
Why does my digit not match the one printed on the passport?
Almost always because the field was copied at the wrong length. The passport number occupies nine characters and the dates six, padded with «<» when the value is shorter. Copy the whole field, filler included, and calculate again.
Does the value I type leave my browser?
No. The whole calculation happens on your machine: no request is sent, nothing is stored, and no account is needed.
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.
ICAO country codes
Look up which country — or which other thing — a three-letter MRZ code names.
Sample MRZ generator
Build valid example MRZ lines to test your integration against.