How to verify the validity of a Spanish ID card online (DNIe) ?
Many business or personal processes require the presentation of an identity document: recruitment, rentals, KYC processes, etc.
Nowadays, documents are usually scanned or photographed before being sent by email; therefore, it becomes difficult to ensure that these documents are genuine and have not been modified with image editing software such as Photoshop.
Our product addresses this issue and allows you to:
- extract the information from the MRZ strip of identity documents directly online, analyze it, and verify the security keys that ensure their authenticity
- validate the format of the document number
And all this in just a few seconds!
How does the Spanish ID card (DNIe) validity check work ?
After your purchase is confirmed, you will receive an email with credentials to log in to our identity web application (check your spam folder a few minutes after purchase if you have not received the activation email).

-
Access to the platform
-
You log in to the web application using the credentials received by email after your purchase or registration.
-
-
Verification mode selection
-
From your dashboard, you choose the option “Verify an identity document.”
-
-
Document upload
-
You upload one or more scans (front/back) of the identity document, in image (.jpg, .png) or PDF format.
-
No additional manipulation (cropping, rotation, etc.) is required: the system automatically detects the orientation and the MRZ area.
-
-
Automatic analysis
-
The service reads the MRZ (Machine Readable Zone) and verifies the security keys.
-
It checks essential information (card number, date of birth, expiration date, etc.) as well as the document’s integrity via check digits.
-
-
Instant result
-
The analysis results are immediately displayed in the interface as a status (success/failure) and a detailed report (PDF, JSON or XML).
-
The report details the recognized fields and the validity of each element (control keys, date consistency, etc.).
-
-
Report download and archiving
-
You can download or view the PDF report directly.
-
Data remains available in history for later consultation, but you can delete it at any time (confidentiality guarantee).
-
-
Optional integration (API)
-
If you have a CRM or ERP, you can use the API to automate verification: the document is then sent to the service and the report (or simply the status) is returned to your internal software.
- You can find all details on these links:
-
-
Account and credit management
-
Your analyses are charged only in case of successful MRZ detection (i.e. if the information could be correctly extracted).
-
You can check your credit balance at any time and, if necessary, subscribe to a plan adapted to your needs.
-
-
Support and assistance
-
If you encounter any difficulties or have questions, you can contact support via email or through the integrated help interface.
-
Additional resources (guides, FAQ, API documentation) are also available online.
-
You can find all the details on the product page Identity web suite.
What elements are validated during the validity check of the Spanish identity card (DNIe)?
The document number of the Spanish identity card (número soporte)
The document number corresponds to an official pattern from the ministry: we verify that this is the case to validate it.


The personal number of the identity card holder (DNI)
The personal number (DNI) consists of 8 characters followed by a security key and corresponds to an official ministry pattern: we verify that the whole is valid.


MRZ information
We check and validate all MRZ information as well as the security keys.
Use cases
-
Recruitment and onboarding
When you need to validate the identity of a candidate before signing an employment contract, online identity document verification ensures document compliance and limits fraud risks. You save time in your administrative procedures and offer a smoother experience to your future employees. -
Real estate rental
When signing a lease, you can require identity verification to ensure the tenant’s seriousness. This step ensures that the provided document is authentic and that the information (name, birth date, etc.) has not been altered or falsified. -
KYC process (Know Your Customer)
In the banking, financial sector or for service providers subject to anti-money laundering and fraud obligations, identity validation is essential. MRZ reading and security key verification allow compliance with regulations while simplifying checks. -
Online service registration
Whether it’s for access to a gambling platform, online trading, or any other service requiring proof of majority or strong authentication, automatic identity document control quickly verifies that the user meets legal conditions. -
B2B relations or partnerships
In certain partnerships or commercial contracts, identity proof may be required to ensure the identity of an associate or legal representative. Automated identity document verification helps secure transactions and builds trust between parties.
Professionals, automate identity document verification within your CRM / ERP / Business application!
We offer subscriptions that may better fit your needs! You will find all the details on the pricing page.
We also offer a service to perform verification of all identity or resource documents via API, in addition to our web application, allowing smooth integration with your CRM / ERP / Business application! You can find all details on these links :
How are the results presented from the Spanish identity card DNIe validity verification analysis?
In addition to the web application, analysis results are available for download in PDF / JSON / XML format:

Which document formats are accepted?
You can send your documents as jpg / jpeg / png images, or as PDF.
Scans/photos do not need to be cropped or retouched: they are automatically detected during Spanish identity card validity verification.
It is possible to send both front and back of the document on the same scan and in any order (front first and back below, or vice versa): they will be sorted and recognition will work without problem.
Am I charged if information is not correctly extracted during Spanish identity card DNIe validity verification?
The answer is no! Only a correctly recognized Spanish identity card is billable!
And if characters are not correctly detected (which can happen with poor quality photos for example), you have the option to correct them to get a reliable analysis anyway.
You can see the details in this video:
What is the MRZ on the Spanish identity card?
An automatic reading zone, or optical reading zone, is an area on an official document reserved for reading, identification and validation of that document.
Thus, documents such as passports, national identity cards, residence permits, and driving licenses may or must include, depending on countries and document versions, an optical reading zone.
It is located at the bottom of identity documents: it contains all the information present on the document with security keys allowing to verify their authenticity and that they have not been altered.
The information found varies according to the document type.
How is it composed?
Cards issued from 2021 have three lines of text, each containing alphanumeric characters.
What data is extracted during the Spanish identity card DNIe validity verification?
Data extracted from the MRZ of the Spanish identity card are as follows:
- First line:

- Document Type: 2 characters, code indicating the document type, 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 card number.
- Check Digit: 1 character, check digit of the unique card number.
- End of line: 15 characters, “<” to complete the line.
- Second line:

- Date of birth: 6 characters, year, month and day of birth in YYMMDD format.
- Check Digit: 1 character, check digit of the date of birth.
- Sex: 1 character, “M” for male, “F” for female.
- Expiration date: 6 digits, card expiration date in YYMMDD format.
- Check Digit: 1 character, check digit of the expiration date.
- Country Code: 3 characters, ISO 3166-1 alpha-3 code of the holder’s nationality.
- Date of issue: 4 characters in YYMM format
- End of line: 11 characters, chevrons to complete the line.
- Check Digit: 1 character, check digit of the concatenation of characters from line 1 positions 6-15, line 2 positions 1-7, and line 2 positions 9-15.
- Third line:

- Name and given names of the holder: holder’s family name followed by the first name. The family name and first name are separated by two characters <. In case of compound family name, compound first name or several given names, they are separated by the character <. Spaces and apostrophes are replaced by the character < and the name is truncated to 30 characters if needed, and any accents on letters are removed. The line is then completed by the character <.
Personal data
You can delete all data once the report is downloaded: simply delete the analysis from the web interface history! The data are also automatically deleted after 3 months.
You can find details about personal data on our dedicated page : Privacy Policy.
Terms and conditions
You can find the details of our terms and conditions at the following address : TrustDocHub Terms and Conditions.
Isabel C. –
Highly recommended for regular MRZ verifications.
Sofia P. (verified owner) –
The setup process was straightforward, and results were reliable.
Javier R. (verified owner) –
The tool provides excellent accuracy for MRZ verifications.
Ana F. (verified owner) –
A perfect solution for accurate MRZ checks on ID cards.
Elena S. –
Quick and seamless operation, saved me a lot of time.
Maria L. –
An excellent tool that made my verification tasks effortless.
Diego A. (verified owner) –
Good product, though the initial setup instructions were confusing.
Luis M. (verified owner) –
Highly dependable and exceeded my expectations for accuracy.
Carlos G. –
Fast and efficient, a reliable tool for professionals.
Raul T. –
This tool is easy to use and provides consistent results.
Pedro H. (verified owner) –
The tool works fine, but the interface could use some improvement.
Lucia V. –
Great product, perfect for biometric identity card verifications.