GALAXY OF TOOLS

BUSINESS SECTOR

MRZ Checker — Decode a Passport MRZ Code and Verify Its Check Digits

Paste the two or three MRZ lines from a passport or ID card to decode every field and verify the check digits.

Privacy: the check runs entirely in this browser and nothing is stored or sent. Still, avoid pasting a real passport’s MRZ on a shared or public computer — the ICAO specimens below are safe to try.

Two lines of 44 characters (passport), two of 36 or three of 30 (ID cards). Use < for the filler; spaces are ignored.
All check digits passTD3 passport · 5 of 5 check digits correct
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L898902C36UTO7408122F1204159ZE184226B<<<<<10

    Decoded fields

    FieldIn the MRZMeans
    Document typeP<P
    Issuing state or organisationUTOUTO — Utopia (ICAO specimen state)
    NameERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<ERIKSSON, ANNA MARIA
    Document numberL898902C3L898902C3
    NationalityUTOUTO — Utopia (ICAO specimen state)
    Date of birth7408121974-08-12
    SexFFemale
    Date of expiry1204152012-04-15 (expired)
    Personal number / optional dataZE184226B<<<<<ZE184226B

    Check digits

    Check digitPrintedCalculatedResult
    Document number66pass
    Date of birth22pass
    Date of expiry99pass
    Personal number / optional data11pass
    Composite (line 2: 1–10, 14–20, 22–43)00pass
    How a check digit is calculated — document number L898902C3

    Digits keep their value, A = 10 … Z = 35 and the filler < = 0. Multiply by 7, 3, 1, 7, 3, 1 … from the left, add up, and take the last digit of the sum. The specimen prints 6.

    CharacterValueWeightProduct
    L217147
    88324
    9919
    88756
    99327
    0010
    22714
    C12336
    3313
    Sum316
    Check digit = sum mod 106

    Formats and check digits: ICAO Doc 9303, Machine Readable Travel Documents, Eighth Edition (2021) — Part 3 (check digits, character values, country codes), Parts 4 (TD3), 5 (TD1), 6 (TD2) and 7 (visas). Specimen lines are ICAO’s fictional “Utopia” documents. A correct MRZ does not prove a document is genuine.

    Runs entirely in your browser. Nothing you enter or upload is sent to a server.

    What the MRZ on your passport says — decoded and checked

    The two lines of letters, digits and < signs at the bottom of a passport’s photo page are its machine-readable zone, or MRZ. This free MRZ checker decodes them: document type, issuing country, name, passport number, nationality, date of birth, sex, expiry date and the optional personal number. It also recalculates every check digit, so you can see at once whether a line was copied or scanned correctly.

    It reads all the ICAO formats — TD3 passports (2 × 44 characters), TD1 ID cards (3 × 30), TD2 cards (2 × 36) and visas. The work happens in your browser; nothing is stored or sent. It is a checker only: it does not generate an MRZ, and a correct MRZ is not proof that a document is genuine.

    How to use the MRZ Checker / Decoder

    1. Type or paste the MRZ lines into the box — or start with one of the ICAO specimens.
    2. Read the verdict: whether every check digit passes, and which format was detected.
    3. Look at the coloured lines to see where each field sits; a failing check digit is shown in red.
    4. Check the decoded fields and the check-digit table to find the character that is wrong.
    5. Press Clear when you are done, especially on a shared computer.

    MRZ Checker / Decoder features

    Every ICAO format

    TD3 passports, TD1 and TD2 identity cards, MRV-A and MRV-B visas, detected from the line lengths.

    All check digits

    Document number, date of birth, expiry, personal number and the composite digit, with printed vs calculated values.

    Colour-coded lines

    Each field in its own colour, so you can match the MRZ to the visual page.

    Long card numbers

    TD1 document numbers longer than nine characters, which continue into the optional data, are handled.

    Forgiving input

    Lower case, spaces, « signs and a single pasted line are cleaned up for you.

    Reading a passport MRZ code (TD3)

    PositionsLine 1Line 2
    1–2Document type (P, often P<)1–9: passport number; 10: its check digit
    3–5Issuing state (e.g. IND, GBR, USA, D for Germany)11–13: nationality
    6–44Surname << given names, with < between words14–19: date of birth YYMMDD; 20: check digit
    21: sex (M, F or <); 22–27: expiry YYMMDD; 28: check digit
    29–42: personal number or optional data; 43: its check digit; 44: composite check digit

    How the 7-3-1 check digit works

    Doc 9303 Part 3 turns each character into a number — 0–9 as themselves, A = 10 to Z = 35, and < = 0 — multiplies them by the repeating weights 7, 3, 1, adds the products and keeps the last digit of the total. For the specimen passport number L898902C3 the products are 147, 24, 9, 56, 27, 0, 14, 36 and 3; they add up to 316, so the check digit is 6 — exactly what the specimen prints after the number.

    The composite digit at the end of a passport’s second line covers the document number, date of birth, expiry date and personal number together with their own check digits, so one wrong character usually shows up twice. That is how the checker points you to the field to correct.

    Common reasons an MRZ fails

    • O typed instead of 0 (or I instead of 1) in a number field — the MRZ font makes them look alike.
    • A missing or extra <, which shifts every later field.
    • Copying from a photo with OCR, which often reads < as K or « as two characters.
    • Two-digit years: a birth year of 74 means 1974 and an expiry of 32 means 2032 — the checker decides by today’s date.

    MRZ Checker / Decoder FAQ

    What is the MRZ code on a passport?

    The machine-readable zone: two lines of 44 characters at the bottom of the photo page holding your name, passport number, nationality, date of birth, sex and expiry date, plus check digits. Border scanners read it optically.

    How do I check if my passport MRZ is correct?

    Paste both lines into this MRZ checker. If every check digit passes, the characters were read consistently; a failing digit shows which field has a typo.

    Does a valid MRZ mean the passport is real?

    No. Check digits only catch reading and typing errors. Authenticity is checked by the issuing authority, the chip and the document’s security features.

    Why does my name look different in the MRZ?

    The MRZ uses only A–Z, so accents are removed or transliterated (Ö becomes OE or O), spaces become <, and long names are cut short at the end of the line.

    Can it read ID cards and visas?

    Yes — TD1 (3 lines of 30), TD2 (2 lines of 36) and machine-readable visas (MRV-A and MRV-B) as well as TD3 passports.

    Is it safe to paste my passport details?

    Nothing leaves your browser and nothing is saved, but avoid doing it on a shared computer, and clear the box when you finish.

    You might also need