MRZ Reader Online

Parse and validate the machine readable zone of passports, ID cards and visas (TD1, TD2, TD3, MRV-A/B), check digits, or generate an MRZ from data.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

Send the 2 or 3 lines of an MRZ as mrz (newlines, an array, or one string of 88 / 90 / 72 characters; spaces and « are cleaned) — the text that passport readers, OCR SDKs and hotel check-in scanners output. The format is detected: TD3 passports, TD1 identity cards (3 × 30), TD2 (2 × 36), MRV-A and MRV-B visas (ICAO Doc 9303 Part 7), plus French ID cards and Swiss / French driving licences. You get the document code and type, issuing state and nationality (ICAO codes with English and Vietnamese names, including D, XXA stateless, UN and EU codes), surname and given names, document number (long TD1 numbers rebuilt from the optional data), birth and expiry dates as ISO dates with age, expired and days to expiry, sex, personal number and optional data.

Each check digit (document number, birth date, expiry, personal number, composite) is recomputed with the 7-3-1 weights and reported with the expected value; autocorrect=true fixes common OCR confusions (O/0, I/1, B/8, S/5, Z/2, G/6) by field type. For Vietnamese chip ID cards (CCCD / thẻ căn cước, IDVNM) the 12-digit personal number in the optional data is decoded (province, century / sex, birth year) and cross-checked.

op=create builds an MRZ from format (TD1, TD2, TD3, MRVA, MRVB), issuing_state, last_name + given_names (or a Vietnamese full_name, family name first), document_number, nationality, birth_date, sex, expiry_date and optional data: names are transliterated to the ICAO form (Vietnamese diacritics removed, Đ → D, Ä → AE…) and truncated by the ICAO rules, check digits computed, and the result parsed back. Nothing is stored or logged; a valid MRZ does not prove a document is genuine.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/mrz" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mrz":"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<\nL898902C36UTO7408122F1204159ZE184226B<<<<<10"}'

API documentation → Get a free API key

FAQ

Does it read images?

No, it reads MRZ text. Use your scanner or an OCR SDK to get the text, then send it here.

Why is the issuing state of the sample "UTO"?

Utopia is the fictitious state of ICAO specimens; it is accepted and flagged with specimen=true.

How are Vietnamese names written?

Without diacritics, Đ as D, family name first: NGUYEN<<THI<ANH<TUYET. Long names are shortened from the last given name.