Launch offer20% off every Pro version until 30 November, applied at checkoutSee the pricesHoliday offer15% off every Pro version until 31 December, applied at checkoutSee the prices
mutewareAdd to Chrome

Free tools / Spanish NIF, DNI and NIE checker

Spanish NIF, DNI and NIE checker

Type or paste a Spanish DNI, NIE or the NIF of a company to check its form and its control letter. Leave the letter out and the page works it out for you. Useful when you enter a Spanish customer or supplier in your books and want to catch a typing error first. The number is checked in your browser and sent nowhere.

A DNI or NIE is personal data. Pasting a text with such numbers into an AI chat? Scrub online replaces them with placeholders first. Need the amounts for the invoice as well? Use the VAT calculator.

How it works

Type the number

With or without spaces, dots and hyphens, and with or without ES in front.

See what it is

A DNI, an NIE or the NIF of an entity, and for an entity what kind the first letter stands for.

Check or complete

A full number is tested against its control letter. For digits without a letter you get the letter that belongs to them.

Questions

What is the difference between NIF, DNI, NIE and CIF?

NIF is the Spanish tax number. For a Spanish national it is the number of the identity card (DNI): 8 digits and a letter. For a foreign national it is the NIE: X, Y or Z, 7 digits and a letter. A company or other entity has a NIF that starts with a letter for the kind of entity, followed by 7 digits and a control character. That last one was called CIF until 2008, and many people still use that name.

How is the letter of a DNI worked out?

Divide the 8 digit number by 23 and take the remainder, from 0 to 22. The remainder points to a letter in the fixed row TRWAGMYFPDXBNJZSQVHLCKE: 0 is T, 1 is R, and so on. For 12345678 the remainder is 14, which gives Z.

How is the letter of an NIE worked out?

Replace the first letter by a digit, X by 0, Y by 1 and Z by 2, and then do the same as for a DNI: the remainder after dividing by 23 points to the letter.

How is the control character of a company NIF worked out?

From the 7 digits: add the digits in the even places, double each digit in the odd places and add the digits of those results, and take the last digit of the total away from 10. The outcome is written as a digit or as a letter from the row JABCDEFGHI, depending on the kind of entity.

Does a valid number mean the person or company exists?

No. The check shows that the number is well formed and has no typing error. Whether it has been issued, and to whom, is known only to the Spanish tax agency.

How do I check a Spanish VAT number for trade within the EU?

The Spanish VAT number is ES followed by the NIF, and it only works for trade within the EU when the business is registered for it. Check that with the Spanish VAT number check against VIES.

Is what I type sent anywhere?

No. The check runs in JavaScript on this page, on your own computer. There is no account and nothing you type or paste is sent to us or to anyone else. You can see this in the network tab of your browser.

More free tools

Keep data like this out of your AI chats

Scrub for AI replaces IBANs, phone numbers, email addresses, API keys and tokens with placeholders before you paste, and puts them back in the answer. It runs in your browser. Free, no account.