InputTestHub

Spain IBAN Validator

Validates a Spanish IBAN: the mod-97 checksum, the 24-character length and the structure, with the código de entidad identified.

Security Nothing uploaded No sign-up Free, unlimited
Security tool
Enter something above.
In short A Spanish IBAN is exactly 24 characters: ES, two check digits, then 4 digits, then 4 digits, then 1 digits, then 1 digits, then 10 digits — so the 4 characters after the check digits are the código de entidad — 2100 in the example — the next 4 are the oficina, 0418, and the remaining 12 are the account, 450200051332. A Spanish IBAN carries the old twenty-digit CCC intact: four digits of entidad, four of oficina, two dígitos de control, then ten of account. Those two control digits are a national checksum computed before the IBAN existed, so a Spanish number is checked twice by two different rules. The checksum is ISO 7064 MOD-97-10: move the first four characters to the end, turn each letter into its position in the alphabet plus nine, and read the result as one long number, which must leave remainder 1 when divided by 97. That catches every single-character mistake and almost every swap of two neighbouring characters, which is what it was designed for and why an IBAN is worth checking before you pay rather than after. What it cannot do is tell you the account exists, is open, or belongs to the person you think — a random string of the right shape passes about once in 97 tries, and no amount of arithmetic reaches into a bank. This page runs entirely in your browser, so the number you type is not sent anywhere.

How to use the Spain IBAN Validator

  1. Paste the Spanish IBAN — spaces and dashes are fine.
  2. Read the three checks: mod-97, length and structure.
  3. If it fails, the page says which check failed and what that usually means.

About the Spain IBAN Validator

Checks a Spanish IBAN three ways — checksum, length and structure — and says which of the three failed when one does, because they mean different things.

What people use it for

  • Checking a Spanish IBAN before sending money to it.
  • Finding the código de entidad inside an IBAN you have been given.
  • Confirming a Spanish number was typed or pasted correctly.

Details

Length24 characters, always
Structure4!n4!n1!n1!n10!n after the check digits
In wordsES, 2 check digits, then 4 digits, then 4 digits, then 1 digits, then 1 digits, then 10 digits
Código de entidad4 characters — 2100 in the example
ExampleES91 2100 0418 4502 0005 1332
Check digitsAlways between 02 and 98. 00, 01 and 99 cannot occur
PrivacyThe arithmetic runs in your browser. Nothing you type is sent anywhere

The maths behind it

This tool uses ISO 7064 MOD-97-10 — move the first four characters to the end, replace each letter with its position plus nine, and a valid IBAN leaves remainder 1 on division by 97. On top of that, Spanish IBANs are exactly 24 characters and follow 4!n4!n1!n1!n10!n. Every intermediate value is shown on screen, so the result can be checked by hand.

Three checks, reported separately on purpose. A length error means a character is missing or extra, a structure error means a letter sits where a digit belongs, and a checksum failure with both of those right means a genuine typo inside the number — most often two neighbouring characters swapped.

Where this tool stops

It checks arithmetic and shape. It cannot tell you the account exists or who it belongs to, it does not look the bank up, and it does not verify any national check digits Spain may use inside its own account number — those are separate rules, computed differently, and passing mod-97 says nothing about them.

Frequently asked questions

How many characters is a Spanish IBAN?
Exactly 24, with no exceptions. After the two check digits the structure is 4!n4!n1!n1!n10!n — 4 digits, then 4 digits, then 1 digits, then 1 digits, then 10 digits. A number of any other length is not a Spanish IBAN, whatever else about it looks right.
What are the two digits after the branch in a Spanish IBAN?
The dígitos de control — Spain’s own check digits, part of the Código Cuenta Cliente. They are separate from the two IBAN check digits at the front and are computed by a different weighted rule.
Where is the bank code in a Spanish IBAN?
The 4 characters after the check digits are the código de entidad — 2100 in the example — the next 4 are the oficina, 0418, and the remaining 12 are the account, 450200051332.
Does a valid checksum mean the account exists?
No, and this is the thing worth taking away. Mod-97 proves the number is internally consistent — that it was probably typed correctly. It says nothing about whether the account is open, or whose it is. A random string of the right length passes about once in every 97 attempts. Only the bank can confirm the rest.
Is it safe to paste an IBAN here?
The checking happens in your browser and the number is never sent to a server — there is no request to make one. An IBAN is not a secret the way a card number is, since it is printed on every invoice you send, but it is still yours, and it does not leave your machine here.
Are there any usage caps on the Spain IBAN Validator?
No charge and no sign-up. There is no free tier to run out of because there is no paid tier — inputtesthub.com is funded by advertising rather than by metering the utility.
Is what I paste into the Spain IBAN Validator stored?
No. The Spain IBAN Validator runs entirely in your browser using JavaScript. Because the work happens locally, the utility also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
Can I check the maths myself?
It uses ISO 7064 MOD-97-10 — move the first four characters to the end, replace each letter with its position plus nine, and a valid IBAN leaves remainder 1 on division by 97. On top of that, Spanish IBANs are exactly 24 characters and follow 4!n4!n1!n1!n10!n. The full working is printed under the result, so you can follow every step rather than trusting a black box.
When would I actually need the Spain IBAN Validator?
In practice it gets used for three things: checking a Spanish IBAN before sending money to it. Finding the código de entidad inside an IBAN you have been given. Confirming a Spanish number was typed or pasted correctly. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Is there anything the Spain IBAN Validator cannot do?
It checks arithmetic and shape. It cannot tell you the account exists or who it belongs to, it does not look the bank up, and it does not verify any national check digits Spain may use inside its own account number — those are separate rules, computed differently, and passing mod-97 says nothing about them. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What figures does the Spain IBAN Validator work from?
Length is 24 characters, always. Structure is 4!n4!n1!n1!n10!n after the check digits. In words is ES, 2 check digits, then 4 digits, then 4 digits, then 1 digits, then 1 digits, then 10 digits. These are printed on the page itself, so you do not have to take them on trust.
Will this work on a tablet?
Yes. The page is responsive and the utility works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related security tools

All 100
01

Password Strength Checker

Estimates password entropy and crack time, and identifies the specific weaknesses in what you…

02

Hash Generator

Generates MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, all at once.

03

MD5 Hash Generator

Generates an MD5 hash of any text or string, with optional HMAC and uppercase output.

05

SHA-1 Hash Generator

Generates SHA-1 hashes, still required by some legacy systems and Git object addressing.

06

SHA-512 Hash Generator

Generates SHA-512 hashes for checksums, signatures and archival fingerprints. Runs in your…

09

AES Text Encryption

Encrypts and decrypts text with AES-GCM 256-bit using a password, entirely in your browser.

10

XOR Cipher Tool

Applies a repeating-key XOR to text or hex, the operation behind many simple obfuscation…