A national identity card is not a small passport. It has its own machine-readable zone, on the back rather than on the photo side, in three lines of 30 characters instead of two lines of 44. ICAO calls that layout TD1, and in the European Union it has stopped being optional: every identity card a member state issues to its own citizens must now carry it, and cards without a working zone lose their validity by a fixed date.

This post puts the two primary sources side by side. The first is ICAO Doc 9303 Part 5, which defines where every TD1 character goes. The second is EU law: Reg. (EU) 2019/1157 and Council Reg. (EU) 2025/1208, which make the TD1 zone mandatory for member-state identity cards. Every row in the tables below is quoted from those texts and linked, so you can cite it. Where a country cannot be stated from those texts, it is left out.

This is the blog of doc.cheap, a Passport and ID OCR API that reads both passports and ID cards and re-checks their MRZ check digits on the server. Nothing below depends on it.

What a TD1 card is

ICAO Doc 9303 is the international standard for machine-readable travel documents. It is split into parts, and three of them describe the three MRZ sizes: Part 4 covers passports and other TD3-size documents, Part 5 covers "TD1 Size Machine Readable Official Travel Documents", and Part 6 covers TD2 size.

Part 5 (Eighth Edition, 2021) sets the physical card at the ID-1 size of ISO/IEC 7810: 85.60 × 53.98 mm, the size of a bank card. It puts the zone on the reverse: "The MRZ is located on the back of the TD1." That one sentence explains most failed ID-card reads in practice. A photo of the front of a card has a face, a name and a number, but no zone to check.

The three MRZ formats compared:

Format Lines × characters Defined in Typical document
TD1 3 × 30 Doc 9303 Part 5 National ID cards, residence permits
TD2 2 × 36 Doc 9303 Part 6 Some older cards and travel documents
TD3 2 × 44 Doc 9303 Part 4 Passport booklets

The MRZ formats page shows all three layouts next to each other.

The 90 characters, field by field

Here is ICAO's own fictitious TD1 specimen, issued by "Utopia" (UTO, a code that exists only in specimens):

I<UTOD231458907<<<<<<<<<<<<<<<
7408122F1204159UTO<<<<<<<<<<<6
ERIKSSON<<ANNA<MARIA<<<<<<<<<<

Part 5 §4.2.2 defines every position. Positions are counted from 1, as ICAO counts them.

Line Positions Field In the specimen
1 1–2 Document code; the first character is A, C or I I<
1 3–5 Issuing state or organisation UTO
1 6–14 Document number D23145890
1 15 Check digit over the document number 7
1 16–30 Optional data for the issuer fillers
2 1–6 Date of birth, YYMMDD 740812
2 7 Check digit over the date of birth 2
2 8 Sex: F, M or < F
2 9–14 Date of expiry, YYMMDD 120415
2 15 Check digit over the date of expiry 9
2 16–18 Nationality UTO
2 19–29 Optional data for the issuer fillers
2 30 Composite check digit over lines 1 and 2 6
3 1–30 Name: primary identifier, <<, secondary identifier ERIKSSON<<ANNA<MARIA

Three things here differ from a passport and trip up parsers written for TD3:

  • The name is last, not first. On a passport the name is on line 1. On a TD1 card it fills the whole of line 3, and a long name is cut to fit 30 characters.
  • Nationality and issuing state are on different lines. Line 1 carries the issuer, line 2 the holder's nationality. On most cards they are the same code, but a parser should not assume it.
  • The composite digit spans two lines. It covers data from line 1 and line 2 together, so a validator that checks one line at a time cannot compute it.

All check digits use the same 7-3-1 weights as a passport; the MRZ parser shows each computed digit beside the printed one.

What EU law requires

The EU rules for identity cards were first set by Reg. (EU) 2019/1157, which applied from 2 August 2021. The same rules, with the same dates, are carried by Council Reg. (EU) 2025/1208 of 12 June 2025, published in the Official Journal on 20 June 2025. The table quotes the 2025 text.

Rule What the text says Where
Format Identity cards "shall be produced in ID-1 format and shall contain a machine-readable zone (MRZ)", following ICAO Document 9303 Art. 3(1)
Data The card's data elements follow ICAO Document 9303, part 5 Art. 3(2)
Chip A storage medium holding a facial image and two fingerprints Art. 3(5)
Old cards, general Cards that do not meet Art. 3 "shall cease to be valid at their expiry or by 3 August 2031, whichever is earlier" Art. 5(1)
Old cards without a working MRZ Cards without the ICAO part 2 security minimum, or without "a functional MRZ", cease to be valid "at their expiry or by 3 August 2026, whichever is earlier" Art. 5(2)(a)
Holders aged 70+ Cards of persons aged 70 and above at 2 August 2021, with the part 2 security minimum and a functional MRZ, stay valid until they expire Art. 5(2)(b)

The practical reading for anyone building an ID-card flow: since 3 August 2026, an identity card issued by a member state to its own nationals, and still valid under this rule, has a TD1 machine-readable zone. Before that date, older cards without a working zone could still be valid, which is why a check that requires the MRZ could reject a lawful card. This is a summary of the text, not legal advice.

Which countries the rule covers

The 2025 text names its own edges. These are the rows the text itself supports:

Group Status under Council Reg. (EU) 2025/1208 Where in the text
Member states that issue identity cards Bound: cards follow Art. 3, old cards phase out under Art. 5 Articles 3 and 5
Member states without a national identity card Not required to introduce one: the text "does not require Member States to introduce identity cards … where they are not provided for under national law" Recital (9)
Denmark "Not taking part in the adoption" and "not bound by it or subject to its application" Recital (47)
Ireland Notified "by letter of 18 October 2024, its wish to take part" Recital (48)
The Irish passport card Outside the scope: part 5 travel documents "that do not serve identification purposes in the issuing Member States, such as the passport card issued by Ireland" Recital (12)

Two consequences follow. A TD1 card with an MRZ is not proof that the document is a national identity card: the Irish passport card is a Part 5 document too, and the law treats it separately. And the absence of a national card in a given country is not a gap in the law, because the law never asks for one.

For the card of a specific country, the reference is the specimen itself. The Council's General Secretariat publishes images of genuine documents in what Reg. (EU) 2020/493 calls "a Public Register of Authentic Travel and Identity Documents Online, known as PRADO", at consilium.europa.eu/prado. Each entry shows both sides of a card, so you can see where that issuer puts its zone and what its optional-data fields hold.

What this means for an ID-card upload flow

  • Ask for the back. The zone is there by definition, so a flow that only asks for the front gets no MRZ to check.
  • Expect three lines, and parse by shape. Three lines of 30 characters is TD1; two of 36 is TD2; two of 44 is TD3. Detect the format before reading fields.
  • Do not hard-code the document code. Part 5 allows A, C or I as its first character, so a check for I alone rejects valid cards.
  • Treat the optional-data fields as issuer-defined. Part 5 leaves their content to the issuing state, so parse them per issuer, not as one fixed field.
  • A passing MRZ is consistency, not authenticity. Check digits prove the zone was read correctly, not that the card is genuine.

How doc.cheap handles a TD1 card

The API takes one image per call, so the two sides of a card are two calls that share the same reference. The guide Recognize an ID card covers that flow: the back usually returns mrz.status: passed, and a front with no zone returns mrz.status: absent rather than an error. When a zone is read, mrz.lines holds the lines as printed (three for a TD1 card, two for a TD3 passport), so you can re-run the check digits yourself; the server checks the TD1 digits by the positions of Part 5 §4.2.4. The document.country field carries the three-letter issuer code.

For passports from the same countries, passport OCR by country covers the TD3 side. If you are comparing hosted APIs, the passport OCR API comparison lists published prices and whether each service bills a failed scan. doc.cheap includes 100 free recognitions every month.

Every legal statement above is quoted from the linked EUR-Lex texts and ICAO Doc 9303 Part 5; every statement about doc.cheap was checked against its code.

A question for you: does your ID-card flow ask for the back of the card, and how do you handle a front-only upload? Tell us in the comments below.