MRZ Code—How Does It Work?
Every question you had about MRZ code and how it works, explained.
Every question you had about MRZ code and how it works, explained.
A machine-readable zone (MRZ) refers to an area, typically in an identity document, that can be read by a machine and provides information about the document holder. It’s written in a code designed to help machines quickly scan information pertaining to individuals.
MRZ code has a uniform design that helps optical character recognition (OCR) technology to swiftly scan and verify required information, like in the case of MRZ passport checkers in airports.
While MRZ code technology began in the airline industry, it has become invaluable in many fields beyond aviation, including age checks and anti-money laundering (AML) verification. MRZ code now serves as an additional tool to facilitate swift yet thorough identity verification for a wide variety of purposes.
This article is a resource to help answer questions about what MRZ code is, how it works, and why it is used.
Suggested read: Top 9 Identity Verification Trends in 2025
In essence, MRZ refers to a ‘machine-readable zone’ typically found at the bottom of identity documents like passports or driving licenses. MRZ code is thus simply the format for text used in these areas that makes it easier for machines to read the document information and use it to verify the identity of document holders.
MRZ code has played a key part in identity verification for decades, with its origins lying in the aviation industry. The International Civil Aviation Organization (ICAO) first began its work on machine readable travel documents in 1968 with the aim of accelerating passenger clearance through passport control.
The ICAO later published its initial specifications for machine-readable passports in 1980, which were promptly adopted by the United States, with its first instance of use in the UK in 1988.
The uniform format of the MRZ text allows OCR technology to easily read information, which is then checked against a database to verify the identity holder is who they say they are. MRZ code’s impact on passports has been revolutionary, with non-machine-readable passports having been phased out by the ICAO since 2015.
MRZ code also provides a useful means for identity verification for all kinds of other purposes, with identity verification now possible at home thanks to smart phone cameras to help combat fraud via valid ID checks.
So, what exactly is in the MRZ code at the bottom of your passport, driving license, or ID card?
As shown in the figure above, the MRZ features a code consisting of strings of characters, including numbers, letters, and ‘<’ separators. The information this contains may depend on the country or authority issuing the document.
You may then see how this code contains information on the document type, the issuing country, the document number, and its expiry date, as well as the name, gender, date of birth, and nationality of the document holder. It also includes check digits to provide an extra layer of protection for MRZ validation. We explain how this works below.
The MRZ helps provide an additional line of defense to help detect forged documents and combat fraud, be it immigration fraud or financial fraud. The image below shows how forgeries can be detected.
As identity documents come in different shapes and sizes, there needs to be uniformity to ensure OCR technology can easily read the information in the MRZ.
The ICAO is the organization responsible for this uniformity with the types of MRZ being standardized by ICAO Document 9303, which is adhered to by 193 member states around the world.
Document 9303 mentions three specific formats of MRZ relating to three different sizes of identity document:
As mentioned earlier, the MRZ formats standardized by the ICAO allow machines to use OCR technology to easily scan the MRZ and verify key information from the identity documents. Machines generally do this through three steps.
Step 1: The MRZ first needs to be scanned by the machine. This can be done via a passport reader at an airport, via a phone camera in the comfort of one’s home, or any other machine capable of scanning text.
Step 2: The uniform format of the text in the MRZ allows the relevant data to be easily extracted for the next step. Generally, this data includes the name, gender, date of birth, and nationality of the document holder, as well as information on the issuing country, the document number, and its expiry date to ensure validity.
Step 3: The document’s checksum is calculated using the check digits in the MRZ to help verify whether the document may be a forgery. The extracted data and checksums are cross-referenced with databases, allowing systems to automatically highlight any suspicious issues to refer for further investigation.
The use of MRZ code has the major advantages of allowing machines to extract information in milliseconds. It helps facilitate compliance with relevant laws and regulations and detect issues for further investigation.
But how exactly does MRZ code help in identity verification?
In essence, the three steps in the process above allow systems to check who people are. The information extracted from the MRZ is checked against databases such as criminal records or sanctions lists, which is effectively how systems used by countries like the U.S. detect suspicious individuals like criminals at the border.
But if people are using forged documents or trying to pass themselves off as someone else, MRZ discrepancies can also be used to combat fraud, as demonstrated by official guidance from the British government. Seemingly subtle differences can lead to swift detection. All it takes is one character different in the MRZ for the checksums not to match. More superficial issues like font discrepancies can also be used to detect forgeries and prevent fraud.
Essentially, MRZ code provides extra complexity, making it more difficult to forge documents and thus easier to verify someone is truly who they say they are. This is of great use in many cases where verification needs to be swift, accurate, and thorough, including:
Suggested read: Guide to Digital Document Verification for Compliance and Fraud Prevention
MRZ code was first developed for the aviation industry to facilitate swift yet thorough processing through border security. Technological advances since the 1980s, however, mean the benefits of this technology can now be used for many more purposes, like AML and fraud prevention. This has been made possible thanks to the proliferation of OCR technology through smartphones, tablets, and computers.
OCR technology can extract the text in an individual’s identity document to check against sanctions lists and criminal databases, helping to automatically identify issues of potential concern. The ability to then easily verify checksums and encoded data also makes MRZ code a simple yet powerful tool in fraud prevention, including AML and KYC compliance processes.
Individuals can now use cameras on their devices to onboard for products with additional regulatory frameworks like crypto exchanges or age-restricted products, helping to prevent fraud while ensuring organizations do not fall foul of identity verification regulations. MRZ code helps Sumsub to offer swift ID Verification services, minimizing user drop offs and preventing fraud regardless of the document holder’s country or language.
In essence, MRZ code can help in more efficient adherence to AML and KYC regulations, providing the major advantage of speed without compromising efficiency. This means users can verify who they are easier, minimizing disruption for users and service providers alike.
For more from Sumsub about the latest in verification fraud, read and listen to our Identity Fraud 2024: “What the Fraud?” Podcast
The MRZ code on a passport refers to the machine-readable zone at the bottom of the document, featuring two lines with 44 characters in each line. This is written as a simple standardized code to ensure it can be read by machines, containing information like the type of document, the passport holder’s name, their date of birth, gender, document number, issuing authority, and the document’s expiry date.
The MRZ code on driving license and other ID cards refers to the machine-readable zone at the bottom of the card. This consists of three lines with 30 characters in each line. This is written as a simple standardized code to ensure it can be read by machines, containing information like the type of document, the document holder’s name, their date of birth, gender, document number, issuing authority, and the document’s expiry date.
A machine-readable passport (not to be confused with a biometric passport) contains a machine-readable zone (MRZ) that can be scanned via a machine to extract information for faster and more accurate processing. A non-machine-readable passport has to be manually inspected, which may take longer and lead to human error, but these have been phased out since 2015 by MRZ passports.