Tool

Spain DNI/NIE/NIF/CIF Workbench

Validate Spanish DNI, NIE, NIF, legacy CIF, and ES VAT-style identifiers with local checksum diagnostics.

Validate

Waiting for input

Advanced analysis
Documentation

Spain ID Validator guide

Spain ID Validator developer examples

Normalize before storing or comparing Spanish identifiers: uppercase letters, remove separators, and treat the ES VAT prefix as context rather than part of the local checksum body.

For logs and fixtures, prefer generated fictional values from this workbench. Do not paste production identity data into bug reports or test cases.

Spain ID Validator practical examples

Use 00000000T as a fictional DNI-style fixture and X1234567L as a fictional NIE-style fixture. For legal-entity data, B12345674 demonstrates the CIF/NIF weighted checksum pattern.

The tool also accepts an optional ES prefix for VAT-style syntax checks, for example ESX1234567L.

How Spain ID Validator works

Spanish identifier data often mixes DNI, NIE, NIF, legacy CIF labels, and EU VAT prefixes. This workbench separates those concepts before validating the control character.

DNI and NIE use the same modulo-23 control-letter table. Legal-entity NIF values, often still called CIF in older systems, use a weighted control digit or letter based on the entity prefix.

Spain ID Validator questions and edge cases

A valid checksum does not prove identity, residency, tax status, or company registration. It only proves that the string matches the supported structural rule.

NIF is the broad tax-identification concept. DNI and NIE can act as NIF values for individuals, while legal entities use a different prefix and checksum family. CIF is legacy terminology that still appears in many datasets.

Spain ID Validator references and limits

Use official Spanish government, Agencia Tributaria, and EU VIES resources when legal, tax, or registration status matters. This page intentionally avoids live registry lookups.

For development, keep syntax validation separate from identity verification and from VAT/VIES business-status checks.