MRZ checker for passports and ID cards

Paste two or three MRZ lines from a passport, ID card or visa to check each field and spot a character that may be wrong.

Examples

Check an MRZ

Two or three lines, as on the document. Spaces and lower case are fine.

Printed page

Optional. Each detail you enter is compared with what the MRZ holds.

The MRZ is checked in this browser and is not sent or stored.

Result Passport

Not valid
DocumentPassport
ExpiresApr 15, 2034
Age today52

A scan or typist read O on line 2, position 6, where the document most likely has 0.

IssuerUtopia (Sample) (UTO)
NationalityUtopia (Sample) (UTO)
SurnameEriksson
Given namesAnna Maria
Document numberL8989O2C3
Date of birthAug 12, 1974
SexFemale
Date of expiryApr 15, 2034
DetailPrintedMRZResult
SurnameErikssonErikssonAgree
Given namesAnna MaríaAnna MariaAgree
Document numberL898902C3L8989O2C3Differ
Date of birthAug 12, 1974Aug 12, 1974Agree
Date of expiryApr 15, 2034Apr 15, 2034Agree

MRZ map

Green outlines mark matching check digits, red marks a mismatch, and orange marks a character that was probably misread. Click a row below to outline that field.

MRZ fields

FieldPositionDecodedCheck digitResult
Layout–2 × 44 · TD3–Pass
1 Document codeLine 1, 1 to 2P–Pass
2 IssuerLine 1, 3 to 5Utopia (Sample) (UTO)–Pass
3 NameLine 1, 6 to 44ERIKSSON, ANNA MARIA–Pass
4 Document numberLine 2, 1 to 9L8989O2C3Found 6, expected 0Check digit mismatch. Reading O on line 2, position 6, as 0 makes it match
5 NationalityLine 2, 11 to 13Utopia (Sample) (UTO)–Pass
6 Date of birthLine 2, 14 to 19Aug 12, 19742Pass
7 SexLine 2, character 21Female–Pass
8 Date of expiryLine 2, 22 to 27Apr 15, 20349Pass
9 Optional dataLine 2, 29 to 42ZE184226B1Pass
10 Final check digitLine 2, character 44–Found 6, expected 0Check digit mismatch

MRZ layouts

Each check digit uses the characters before it, weighted 7, 3 and 1 in turn. The last check digit covers the fields together.

LayoutDocumentLines and charactersCheck digits
TD3Passport2 × 445
TD1ID card3 × 304
TD2ID card2 × 364
MRV-ALarge visa2 × 443
MRV-BSmall visa2 × 363
IDFRAFrench national ID card2 × 363

Run these checks on every application in your onboarding decision flow. Start your trial

What an MRZ checker checks

An MRZ is the machine-readable text printed at the foot of a passport, ID card or visa. Its check digits are worked out from the characters in each field.

The check shows whether the characters agree with their check digits and decodes the fields. Compare those details with the printed page, then look at the document again if they differ.

MRZ questions

What does an MRZ checker do?

It checks the MRZ layout and its check digits, then decodes the fields. You can also compare details with the printed page.

How is a passport MRZ check digit calculated?

Each character has a value, and the values are multiplied by repeating weights of 7, 3 and 1. The check digit is worked out from the total.

What does the MRZ on a passport mean?

The MRZ holds fields such as the document number, name, nationality and dates. ICAO Doc 9303 defines the layout and check digits.

Does a valid MRZ mean the passport is real?

No. Matching check digits mean the characters agree with each other. They do not show whether the document is genuine or was issued.

Why does the MRZ differ from the printed page?

A scan can misread a character, and a person can mistype one. Compare the fields and check the document again if they differ.