Validate Spanish NIF, CIF and NIE

This tool validates the control digit of a Spanish NIF, DNI, NIE or CIF with the official AEAT algorithm. A wrong tax ID leads to rejected invoices; check it first. Everything runs in your browser.

Frequently asked questions

NIF vs DNI vs NIE vs CIF?

The DNI/NIF identifies Spanish individuals (8 digits + letter). The NIE identifies foreigners (starts with X, Y or Z). The CIF identifies legal entities (letter + 7 digits + control).