Verify the MRZ of an identity card: complete guide (structure, check digits, fraud detection)

Verify the MRZ of an identity card: complete guide (structure, check digits, fraud detection)

Introduction

The MRZ (Machine Readable Zone) of an identity card is a standardized zone enabling automatic reading and verification of the document’s information. It contains the holder’s essential data as well as several security keys that make it possible to detect errors and falsifications.

Used by authorities, banks, employers and online platforms as part of KYC (Know Your Customer) procedures, the MRZ constitutes a fundamental element in verifying the authenticity of an identity card.

This guide explains in detail the structure of the MRZ of an identity card, the information it contains, how the check digits work, and the methods used to verify its authenticity.

What is the MRZ band of an identity card?

The MRZ (Machine Readable Zone) is a machine-readable zone defined by the international standard ICAO 9303.

This standard ensures that all biometric identity cards use a standardized structure, allowing their automatic reading by computer systems everywhere in the world.

The MRZ contains:

  • the holder’s main identity information,
  • the document information,
  • mathematical check digits enabling verification of the integrity of the data.

These keys make it possible to detect data entry errors and falsification attempts.

Where is the MRZ located on an identity card?

The MRZ is generally located on the back of the identity card, in the lower part of the document.

It is made up of three lines of black characters using the standardized OCR-B font, designed to be easily readable by machines.

This zone is separated from visible information such as:

  • the last name,
  • the first name,
  • the photo,
  • the document number,
  • the date of birth.

How is the MRZ band of an identity card constituted?

The MRZ of an identity card uses the TD1 format, defined by the ICAO 9303 standard.

It is made up of:

  • three lines,
  • a fixed length,
  • fields in a strict order,
  • several check digits.

This structure enables reliable automatic verification.

How many characters are present?

The MRZ of an identity card contains exactly:

  • 3 lines
  • 30 characters per line
  • 90 characters in total

The fixed length makes it possible to immediately detect any anomaly.

What information is present in the first line?

The first line contains information related to the document:

Verify the MRZ of an identity card, line 1
Verify the MRZ of an identity card, line 1
  • the document type (1 character, generally I for identity card),
  • an optional character,
  • the issuing country (3 characters),
  • the document number (9 characters),
  • the check digit of the number (1 character),
  • an optional field (15 characters).

What information is present in the second line?

The second line contains the holder’s information:

Verify the MRZ of an identity card, line 2
Verify the MRZ of an identity card, line 2
  • the date of birth (6 characters, YYMMDD format),
  • the check digit of the date of birth (1 character),
  • the gender (1 character, M or F),
  • the expiration date (6 characters),
  • the check digit of the expiration date (1 character),
  • the nationality (3 characters),
  • an optional field (11 characters),
  • the global check digit (1 character).

What information is present in the third line?

The third line contains nominative information:

Verify the MRZ of an identity card, line 3
Verify the MRZ of an identity card, line 3
  • the last name,
  • the first name,
  • separated by “<<” characters.

The “<” characters are used as separators and filler characters.


Individuals, do you occasionally need to verify one or more identity documents ?

Professionals, do you need to integrate proof of identity validation into one of your business processes, including all European identity cards and global passports ?


How are the security keys of the MRZ band calculated?

MRZ check digits are calculated according to an algorithm defined by the ICAO 9303 standard.

This algorithm uses:

  • a conversion of letters into numerical values
    (A = 10, B = 11, … Z = 35)
  • a repeating weighting: 7, 3, 1
  • a modulo 10 calculation

This mechanism makes it possible to detect any fraudulent modification or error.

Example of a check digit calculation

Let’s take as an example the check digit of the date of birth from the specimen above.

The character string to validate is the following: “750515”.

To calculate the check digit, we will proceed as follows:

– “7” has a value of 7 and is placed in the first position, so it must be multiplied by 7: 7 * 7 = 49

– “5” has a value of 5 and is placed in the second position, so it must be multiplied by 3: 5 * 3 = 15, which is added to the previous 49, i.e. 49 + 15 =64.

– 0 has a value of 0 and is located in the third position, so it must be multiplied by 1: 0 * 1 = 0, which is added to the previous 64, i.e. 0 + 64 = 64.

– 5 * 7 = 35 and 35 + 64 = 99

– 1 * 3 = 3 and 3 + 99 = 102

– 5 * 1 = 5 and 5 + 102 = 107

We therefore obtain a total of 106, from which we will extract modulo 10 (the remainder of the Euclidean division by 10), which amounts to keeping only the last digit, i.e. “7”.

Our check digit is therefore valid because it is 7 that appears on the document!

Complete example of an identity card MRZ explained

Verify the MRZ of an identity card, full MRZ
Verify the MRZ of an identity card, full MRZ

This MRZ indicates:

  • an identity card issued by Greece,
  • number: Z00014375,
  • holder: Georgios ELLINAS,
  • date of birth: 15/05/1975,
  • sex: male,
  • expiration: 19/09/2033,
  • nationality: Greek.

All check digits make it possible to verify the integrity of the information.

What security checks are present in the MRZ?

The MRZ contains several check digits:

  • check digit of the document number,
  • check digit of the date of birth,
  • check digit of the expiration date,
  • final global check digit.

These keys make it possible to verify that the data has not been modified.

How to detect a falsified MRZ?

A falsified MRZ generally presents one or more anomalies:

  • incorrect check digits,
  • invalid structure,
  • incorrect length,
  • inconsistencies with visible information,
  • inconsistencies between the lines.

These anomalies make it possible to detect falsifications.

Difference between passport MRZ and identity card MRZ

MRZ formats differ depending on the type of document:

Passport:

  • TD3 format
  • 2 lines
  • 44 characters per line

Identity card:

  • TD1 format
  • 3 lines
  • 30 characters per line

Each format uses an adapted structure.

How to automatically verify the MRZ of an identity card?

Manual verification is complex and prone to error.

An automated tool makes it possible to:

  • extract the MRZ automatically,
  • verify the check digits,
  • detect inconsistencies,
  • detect falsifications.

TrustDocHub makes it possible to automatically verify the MRZ of an identity card online in a few seconds.

Why does the MRZ make it possible to detect fraud?

The MRZ is based on:

  • an international standardized structure,
  • strict rules,
  • mathematical controls.

Any incorrect modification leads to a detectable inconsistency.

The MRZ therefore constitutes a reliable element for verifying the authenticity of an identity card.


Individuals, do you occasionally need to verify one or more identity documents ?

Professionals, do you need to integrate proof of identity validation into one of your business processes, including all European identity cards and global passports ?


FAQ

Shopping Cart
Scroll to Top