How is the DNI letter calculated?+−
Divide the 8-digit number by 23; the remainder indexes the official table TRWAGMYFPDXBNJZSQVHLCKE (interior.gob.es).
Do the examples match?+−
Yes: 12345678 → Z and X1234567 → L are fixed test fixtures.
What is a NIE?+−
Spain’s foreigner identity number; it starts with X, Y or Z.
How is the NIE letter found?+−
Map X/Y/Z to 0/1/2, then apply the same mod-23 table as for a DNI.
NIF vs DNI?+−
In everyday speech a NIF is often the DNI digits plus the control letter; validation uses that same letter.
What is a CIF?+−
A company tax ID; the control character may be a digit or a letter depending on the organisation type.
Do you calculate CIF too?+−
Common organisation types yes; unsupported types show a clear message — we never invent a CIF.
Can I generate a fake DNI?+−
No. This tool is not a generator; it only calculates or checks a letter.
Do you check if the person exists?+−
No — only the mathematical checksum.
Does my number leave the device?+−
No; the privacy note on the page is mandatory and accurate.
Will you fill in missing digits?+−
No; you get an error instead of invented digits.
Are lowercase X/Y/Z OK?+−
Yes — they are normalised to uppercase.
Spaces or hyphens?+−
They are stripped before the check.
How do expats apply for a NIE?+−
This tool does not apply for you; use official police / extranjería channels. See the short “What is a NIE?” box on the English page.
Will you fix a wrong letter automatically?+−
Validation returns false; use Calculate letter with the digits alone to learn the correct letter.
Has the algorithm changed?+−
The official mod-23 table has been stable for years; interior.gob.es remains the source of truth.
Bulk list validation?+−
One number at a time for now; a bulk checker can come later.
Ads or selling data?+−
We don’t touch ad slots here; the number is not stored or sold.