Validate Spanish DNI/NIE and IBAN
Check the letter of a Spanish DNI or NIE, a CIF and any IBAN
No database: AIMRAN doesn't store your files, text or results
What is Validate Spanish DNI/NIE and IBAN?
With this tool you can check whether a Spanish DNI, NIE or CIF (Spanish ID and tax numbers) is correctly written and calculate the letter that matches a DNI number. It also validates IBAN account numbers from any country.
For Spanish IBANs it shows the bank, branch, check digits and account number. Note: it only checks that the document or account is well formed, not that it actually exists.
How to use it
- Enter a DNI, NIE or CIF in the first box, with or without spaces or hyphens.
- If you only enter the DNI number, you'll see its matching letter.
- Paste an IBAN into the second box.
- Check whether it's valid, the correct format and, for Spanish IBANs, the bank and account.
- Copy the normalized document or IBAN.
Advantages
- Validates DNI, NIE, special NIF (K, L, M) and CIF in a single field, following Spanish rules.
- Calculates the correct letter or check digit if it doesn't match.
- IBANs from more than 90 countries, with bank identification for Spain.
- Free, no sign-up and no ads.
Technical details
The DNI letter is the remainder of the number divided by 23, used as an index into the string TRWAGMYFPDXBNJZSQVHLCKE. In the NIE, the initial letter X, Y or Z is replaced by 0, 1 or 2 before applying modulo 23; K, L and M NIFs use the same calculation on their 7 digits. In the CIF, the digits in even positions are added to the digits of the doubled odd-position digits, and the check value is (10 − sum mod 10) mod 10, expressed as a number or a letter (JABCDEFGHI) depending on the type of entity; the legal form is also indicated by the initial letter. The IBAN is validated according to ISO 13616: length per country, moving the first four characters to the end, converting letters to numbers (A = 10 … Z = 35) and checking that the remainder modulo 97 is 1. For Spanish IBANs, the two account check digits (CCC) are also verified with weights 1, 2, 4, 8, 5, 10, 9, 7, 3, 6 modulo 11.
Frequently asked questions
How is the DNI letter calculated?
The DNI number is divided by 23 and the remainder (0 to 22) gives the letter in the sequence TRWAGMYFPDXBNJZSQVHLCKE. For example, 12345678 has a remainder of 14, which corresponds to Z.
How do I validate a NIE?
Replace X with 0, Y with 1 or Z with 2, divide the resulting number by 23 and the remainder gives the letter, just like the DNI.
How do I know if an IBAN is correct?
The country length and the check digits are verified with the modulo 97 algorithm from ISO 13616. If the remainder is 1, the IBAN is well formed.
Can I find out which bank an IBAN belongs to?
In Spanish IBANs, the four digits after the check digits are the bank code. The tool shows the name of the most common banks.
Does a valid DNI mean it exists?
No. It only means the number and letter are consistent. To know whether it belongs to a real person, it has to be checked through official channels.
More Calculators tools
- VAT calculator (Spain) · Add or remove Spanish VAT at 21, 10 or 4%, with equivalence surcharge
- Percentages · Work out percentages, changes, increases and discounts
- Date difference · Days, weeks, months and working days between two dates
- Age calculator · Your exact age, days lived and how long until your birthday
- Unit converter · Length, weight, temperature, volume, data and much more
- Mortgage calculator · Monthly payment, interest and amortisation schedule
- Compound interest · How much your savings grow with regular contributions
- Split the bill · Split the bill and tip between friends