Skip to content
🔧 Tools ID & Passport Validator

ID & Passport Validator

Check if a Spanish DNI, NIE or NIF is valid instantly. Also validates European passports and foreign identity documents.

🪪 ID & Passport Validator
Spain · Automatic document type detection
Supported types: DNI (8 digits + letter) · NIE (X/Y/Z + 7 digits + letter) · Company NIF (letter + 7 digits + control) · Generic passport (letters + 6-9 alphanumeric) · UK passport · US SSN (NNN-NN-NNNN)
🔒 Your data never leaves this page. Everything is validated locally in your browser.

How does the DNI work?

The Spanish DNI has 8 digits and a control letter. The letter is calculated by dividing the 8-digit number by 23 and using the remainder as an index in the table: TRWAGMYFPDXBNJZSQVHLCKE.

The NIE uses the same algorithm, first replacing the leading letter: X→0, Y→1, Z→2. Company NIFs use a different digit-sum algorithm with a letter or digit control character.

💬 Chat with the community
Share tricks and tips with other users in the chat.
Enter chat →