Tarayıcınız güncel değil

Bu siteyi görüntülemek için tarayıcınızın veya cihazınızın işletim sisteminin güncellenmesi gerekiyor.

Your browser is out of date. Please update iOS or your browser to view this site.

Skip to main content
Gizke.com
Blog

DNI & NIE letter calculator

Calculate the DNI/NIE control letter or check a full NIF, NIE or CIF. Math only — we never invent a number or look anyone up.

Enter a number.

The number never leaves your device; only a math check runs — we do not verify that a person exists.

What is a NIE?

A NIE is Spain’s foreigner ID number (starts with X, Y or Z). This page only computes the letter; it does not file an application. Apply through the Spanish police / extranjería channels.

Spain’s DNI and NIE use a public mod-23 control letter. This page runs that check in your browser — it does not generate identity numbers or query any register.

Frequently asked questions

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.

Share this tool

BlogAboutContactTerms of UsePrivacy Policy