MRZ reader online
Upload a photo of a passport, ID card or visa. We find the machine-readable zone, decode it field by field and check the dates and document number against their check digits.
Drag your document or click to upload
PDF or image ยท max 2 pages
Free trial of up to 2 pages per document.
What the reader returns
The MRZ is decoded by code that follows ICAO Document 9303 and used to correct what the AI reads from the page. This is the specimen passport from that document (a fictitious holder from the fictitious state of Utopia) and what its MRZ contains:
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<< L898902C36UTO7408122F1204159ZE184226B<<<<<10
| Document code | P |
| Issuing state | UTO |
| Surname | ERIKSSON |
| Given names | ANNA MARIA |
| Document number | L898902C3 |
| Nationality | UTO |
| Date of birth | 1974-08-12 |
| Sex | F |
| Expiry date | 2012-04-15 |
The document number, date of birth and expiry date each carry a check digit. They are taken from the MRZ only when their check digit matches; otherwise the value read from the printed page is kept.
How a passport MRZ is laid out (TD3)
Passports use two lines of 44 characters. Every field sits at a fixed position, which is why a reader can decode any passport in the world the same way:
| Line | Positions | Content |
|---|---|---|
| 1 | 1โ2 | Document code: P, sometimes followed by a letter for the passport type |
| 1 | 3โ5 | Issuing state, as a three-letter code (ESP, GBR, BGDโฆ) |
| 1 | 6โ44 | Surname, then << and the given names; < stands for a space |
| 2 | 1โ9 | Document number |
| 2 | 10 | Check digit of the document number |
| 2 | 11โ13 | Nationality (three-letter code) |
| 2 | 14โ19 | Date of birth, YYMMDD |
| 2 | 20 | Check digit of the date of birth |
| 2 | 21 | Sex: M, F or < |
| 2 | 22โ27 | Expiry date, YYMMDD |
| 2 | 28 | Check digit of the expiry date |
| 2 | 29โ42 | Personal number or optional data |
| 2 | 43 | Check digit of the personal number |
| 2 | 44 | Composite check digit over positions 1โ10, 14โ20 and 22โ43 (number, birth date, expiry date, optional data and their check digits) |
ID cards (TD1) and the other formats
Card-sized ID cards and residence permits use three lines of 30 characters, with the name moved to the last line:
| Line | Positions | Content |
|---|---|---|
| 1 | 1โ2 | Document code (I, A or C, plus an optional letter) |
| 1 | 3โ5 | Issuing state |
| 1 | 6โ14 | Document number |
| 1 | 15 | Check digit of the document number |
| 1 | 16โ30 | Optional data (also holds the end of very long document numbers) |
| 2 | 1โ6 | Date of birth, YYMMDD, then its check digit at 7 |
| 2 | 8 | Sex |
| 2 | 9โ14 | Expiry date, YYMMDD, then its check digit at 15 |
| 2 | 16โ18 | Nationality |
| 2 | 19โ29 | Optional data |
| 2 | 30 | Composite check digit |
| 3 | 1โ30 | Surname << given names |
TD2 documents (older ID cards, some residence permits) use two lines of 36 characters with the passport layout squeezed in. Visas carry an MRZ too: MRV-A has two lines of 44 and MRV-B two lines of 36, start with V and have no composite check digit at the end. Upload the visa page the same way as a passport.
Why read the MRZ and not the printed text
- It has a fixed layout. The printed page changes from country to country; the MRZ is the same everywhere.
- It checks itself. If one character is misread (O for 0, I for 1, B for 8), the check digit no longer matches and the error shows up instead of slipping into your records.
- Names come already transliterated into AโZ: Mรผller is MUELLER, Peรฑa is PENA.
- The surname always comes first and is separated from the given names by <<, so the two never get swapped.
Getting a photo the reader can use
- Lay the document flat and include the whole MRZ: a cut-off last character can break the check digits.
- Avoid glare over the bottom lines. Passport laminates reflect overhead light; tilt the document slightly or move away from the lamp.
- A phone photo is enough. Sharpness matters more than resolution; JPG, PNG, TIFF or PDF all work.
- For an ID card, photograph the side with the three lines of text, usually the back.
What happens to the photo
The image is uploaded to be read and deleted as soon as the extraction finishes; the extracted data is deleted automatically after 30 days. If you only need to check an MRZ you already have as text, the MRZ checker does it entirely in your browser and nothing is uploaded.
Frequently asked questions
Is the MRZ reader free?
Yes. Without an account you can read up to three documents a day. A free account includes 20 pages a month and lets you export the results to Excel or CSV.
Can it read the MRZ of a visa?
Yes. Visas use the MRV-A (2 lines of 44) or MRV-B (2 lines of 36) layout; upload a photo of the visa page and the same fields come back.
What is the difference between the MRZ reader and the MRZ checker?
The reader starts from a photo: it finds the MRZ in the image and decodes it. The checker starts from text you paste and shows which check digit fails and what it should be, without uploading anything.
Does it read the chip (NFC)?
No. It reads the printed MRZ in the photo. The chip needs a phone or reader that talks to it directly.
Does a correct MRZ prove the document is genuine?
No. Check digits catch reading and typing errors, not forgeries: anyone can compute them. Authenticity needs the physical security features or the chip.
Can I read many passports at once?
With a free account you can upload batches, or send the photos by WhatsApp or email, and export every document to one spreadsheet.