The Spanish national identity card is an official document that allows any Spanish citizen to prove their identity and, as long as it is valid, their Spanish nationality, just like a passport.
The objective of this card is to enhance security and facilitate identification in electronic transactions, while reducing the risk of forgery.
So, how can you verify a Spanish ID card and ensure that the presented document is authentic? The answer is in this article!
Need more information on how to verify the authenticity of your ID documents ? Check out our comprehensive guide to verifying ID documents, which includes all the resources available !
Check 1: Verifying a Spanish ID card based on its general appearance
The first step in verifying a Spanish ID card when you have access to the original document is the overall appearance: it should not show any signs of cutting, peeling, modification, or correction.
Pay close attention to the area around the photo.
The new electronic ID card follows the ID-1 format, which is the size of a credit card.
Check 2: Verifying a Spanish ID card by cross-checking information
The second step to verify a Spanish ID card online is to check the consistency of the information present on the document.
Document number
The document number can be found in two different places: at the top of the front side, and in the first line of the MRZ strip.
It consists of 12 characters.


Date of birth
The holder’s date of birth can also be found in two different locations: in the middle of the front side of the card, and at the beginning of the second line of the MRZ in the YYMMDD format:


Name and surname(s)
Likewise for the name(s) and surname(s), which can be found on the front side of the card as well as in the third line of the MRZ:

Card expiration date
Finally, the last element present in duplicate on the card: the expiry date, which can be found on the front as well as in the second MRZ line in YYMMDD format:


Check 3: Verifying a Spanish ID Card Using Its MRZ
The bottom section of the new Spanish ID card contains three lines that replicate the data found on the card itself, along with validation keys that help prevent reading errors or forgeries.
Structure of the MRZ on the Spanish ID Card
First Line

- Document Type: 2 characters, code indicating the type of document, represented by the letters “ID”.
- Issuing Country: 3 characters, the ISO 3166-1 alpha-3 code of the issuing country.
- Card Number: 9 characters, unique number of the card.
- Check Digit: 1 character, check digit of the unique card number.
- Personal Number: 9 characters, holder’s personal number.
- Line End: chevrons “<” to fill the line.
Second Line

- Date of Birth: 6 characters, year, month, and day in YYMMDD format.
- Check Digit: 1 character, check digit for the date of birth.
- Gender: 1 character, “M” or “F”.
- Expiration Date: 6 characters, expiration date in YYMMDD format.
- Check Digit: 1 character, check digit for the expiration date.
- Country Code: 3 characters, ISO 3166-1 alpha-3 code of the holder’s nationality.
- Separator: 11 characters, “<“.
- Final Check Digit: 1 character, control digit of the concatenated values from line 1 (6–15), line 2 (1–7), and line 2 (9–15).
Third Line

- Holder’s Full Name: surname and given name of the holder, starting with the surname followed by the first name. The surname and given name are separated by two “<” characters. In the case of a compound surname, compound first name, or multiple given names, they are separated by the “<” character. Spaces and apostrophes are replaced with the “<” character, and the name is truncated to 30 characters if necessary. Any accents on the letters are removed. The line is then completed with the “<” character.
Verifying a Spanish ID Card Using MRZ Security Check Digits
A Spanish ID card contains 4 check digits (or security keys) that validate the preceding information.
They help prevent transcription errors or modifications, whether intentional or accidental.
How Does the Algorithm Work?
The algorithm used to generate and verify check digits is common to all identity documents: each character has a numeric value, which is multiplied by a weight factor depending on its position in the string (7, 3, and 1).
Digits retain their numeric value (“0” = 0, “1” = 1, up to “9” = 9). The chevron “<” has a value of 0, while letters start at a value of 10 for “A”, 11 for “B”, up to 35 for “Z”.
Example
Let’s take as an example the check digit for the date of birth shown on the sample card above.
The string to be validated is: “800101”.
To compute the check digit, we proceed as follows:
– “8” has a value of 8 and is in the first position, so multiply it by 7: 8 * 7 = 56
– “0” has a value of 0 and is in the second position, so multiply it by 3: 0 * 3 = 0, added to the previous 56, gives 56.
– “0” has a value of 0 and is in the third position, so multiply it by 1: 0 * 1 = 0, added to the previous 56, gives 56.
– “1” * 7 = 7 and 7 + 56 = 63
– “0” * 3 = 0 and 0 + 63 = 63
– “1” * 1 = 1 and 1 + 63 = 64
We then get a total of 64. Taking modulo 10 (the remainder of division by 10), we keep the last digit, which is “4”.
Our check digit is therefore valid because 4 is the digit shown on the document!
Check 4: Verifying a Spanish ID Card Using Physical Security Features
An identity document includes various features that allow for the validation of its authenticity.
This is the final and longest step when verifying a Spanish ID card online.
Front Side
Ultraviolet
What it is: Inks that are invisible to the naked eye but visible under UV light (365 nm).
How to see it: Use a UV lamp to reveal multicolored fluorescent patterns, logos, or information.
Purpose: These elements are almost impossible to reproduce without specific inks and allow for quick verification with the right tool.

Optically Variable Mark (OVD)
Type 1: Laser Variable Image (CLI® / MLI®)
- What it is: A changing image depending on the viewing angle, often used to show two faces or two sets of data in the same square.
- How to see it: Tilt the document side to side.
- Purpose: Very difficult to replicate using simple printing techniques; a strong proof of authenticity.

Kinegram
Type 2: Kinegram®
- What it is: A dynamic hologram or metallic pattern embedded into the document.
- How to see it: Tilt the document under different lighting conditions.
- Purpose: Advanced protection against counterfeiting thanks to proprietary technology.

Security Film
What it is: A transparent protective layer sometimes containing visual effects.
How to see it: Observe the document under angled light to see reflections or patterns.
Purpose: Prevents alteration of printed content and provides easy visual detection of tampering.

Biographical Data
What it is: Name, surname, date of birth, nationality, etc.
How to see it: Clearly printed on the front side, often near the photo.
Purpose: Data to cross-check with the MRZ or a database, useful for consistency verification.

Face Photo
- How to see it: On the front, compare it with the person or other available photos.

Printing process
What it is : Techniques such as offset printing, screen printing, laser engraving (for polycarbonates).
How to see it : Observe under a microscope or magnifying glass the screens, fine patterns or inks used.
How to see it : Observe under a microscope or magnifying glass the screens, fine patterns or inks used.
Back
Ultraviolet
Biographical data
Conclusion
You now have all the keys to verify a Spanish identity card online and ensure it is authentic !
You don’t need any specialized equipment for this: a little vigilance and time and you can avoid most of the frauds that you encounter on a daily basis !
Individuals, do you occasionally need to verify one or more identity documents? Discover eligible documents in the store !
Small businesses, do you need to verify one or more identity documents via a web application? Discover the identity web suite!
Professionals, do you need to integrate proof of identity validation into one of your business processes, including all European identity cards and global passports? Discover our API with web application to validate the authenticity of an identity document in less than 10s!