Tool to understand and calculate numbers and information on European ID cards, including character lines at the bottom of the card.
European ID Card - dCode
Tag(s) : Fun/Miscellaneous
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
At the bottom of the European identity card is an optically readable strip written in black on a white background (MRZ machine-readable zone), which presents all the information of the card in a structured format.
The European version 2021 of the European identity card consists of three lines of 30 characters each, making a total of 90 characters. The first line starts with the 2 letters ID, followed by the country code, here is in detail:
Position | Meaning of content |
---|---|
1-2 | Always the 2 letters ID (for IDentity) |
3-5 | 3-letter (ISO3166) country code |
6-14 | Official card number (composed of 9 alphanumeric characters A-Z0-9) |
15 | Checksum digit for Card number |
16-30 | Empty/Reserved/Not used (filled with <) |
Example: ID FRA 123456789 X ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
The date of birth is the first information on the second line, followed by the sex and the expiry date.
Position | Meaning of content |
---|---|
1-2 | Year (2 digits) of birth |
3-4 | Month (2 digits) of birth |
5-6 | Day (2 digits) of birth |
7 | Checksum for 6-digit birthdate |
8 | Sex (M or F) |
9-10 | Year (2 digits) of expiry of the card |
11-12 | Month (2 digits) of expiry |
13-14 | Day (2 digits) of expiry |
15 | Expiry date checksum |
16-18 | Nationality of the holder on 3 letters |
19-29 | Empty/Reserved/Not used (filled with <) |
30 | Checksum of Card number concatenated with date of birth and date of expiration (including checksums) |
Example: 990130 X M 490101 X FRA ‹‹‹‹‹‹‹‹‹‹ X
The cardholder's name appears on the third line:
Position | Meaning of content |
---|---|
1-30 | Last name and first names written in capital letters without accent, and any non-alphabetic character is replaced by the symbol ‹. First names are separated from the family name by a double chevron ‹‹. |
Example: DUPONT‹‹MICHEL‹JEAN‹‹‹‹‹‹‹‹‹‹‹
The identity card number consists of 9 alphanumeric characters and corresponds to the characters located between the 6th and the 14th position of the first line.
Example: DOCUMENT NUMBER XXXXXXXXXX
To calculate the checksum, each character is associated with a numerical value ranging from 0 for the character ‹, 1 for 1 to 9 for 9, 10 for A , 11 for B, and so on up to 35 for Z.
Each character must be multiplied by a factor chosen from three values: 7 for the first character, 3 for the second, 1 for the third, 7 for the fourth, 3 for the fifth, and and so on.
Add all the numbers obtained and retain the last digit corresponding to the units of the result. This number is the control key (checksum).
Example: Calculate the checksum key for DCODE1<, the sum is calculated 91+36+24+91+42+1+0=285 and then the key is 5 :
D | 13 | *7 | =91 | Σ=91 |
C | 12 | *3 | =36 | Σ=127 |
O | 24 | *1 | =24 | Σ=151 |
D | 13 | *7 | =91 | Σ=242 |
E | 14 | *3 | =42 | Σ=284 |
1 | 1 | *1 | =1 | Σ=285 |
‹ | 0 | *7 | =0 | Σ=285 |
The dCode generator only uses public data, without internal numbers and codes provided by the administration. It should be remembered that the use of a false document, fake identity papers, or a fake identity card is punishable by a prison sentence of 5 years and a minimum fine of 75000€.
The dCode checker allows you to check if the MRZ code (the 3 black lines on a white background) of an ID card is valid.
However, in no case can the software check if the card is valid, only government software can do that.
dCode retains ownership of the "European ID Card" source code. Except explicit open source licence (indicated Creative Commons / free), the "European ID Card" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "European ID Card" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "European ID Card" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "European ID Card" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
European ID Card on dCode.fr [online website], retrieved on 2024-11-21,