Spain IBAN format

An IBAN from Spain is 24 characters long: the country code ES, two check digits, then 4 digits (bank code), 4 digits (branch code), 1 digit (account number), 1 digit (national part (check key or type)), 10 digits (national part (check key or type)). Spain is in SEPA. Length and structure from the SWIFT IBAN Registry (ISO 13616), transcribed 2026-10-24; the SEPA flag from the EPC list.

Structure

24 characters in all. Registry notation of the BBAN: 4!n4!n1!n1!n10!n (n digits, a upper-case letters, c alphanumerics, ! fixed length).

PositionLengthCharactersMeaning
1–22letterscountry code ES
3–42digitscheck digits (ISO 7064 mod 97-10)
5–84digitsbank code
9–124digitsbranch code
13–131digitsaccount number
14–141digitsnational part (check key or type)
15–2410digitsnational part (check key or type)

Example

ES98 1234 5678 9012 3456 7890 is a synthetic example: placeholder characters in every part, with the check digits computed so that the mod-97 test passes. It is not a real account and no bank issued it; use it to test an input field, not to pay.

SEPA

Spain is in the geographical scope of the SEPA schemes: a euro credit transfer to this IBAN costs the same as a domestic one and arrives within one business day (seconds with SCT Inst).

Check one

The API checks the characters, the country, the length (24), the mod-97 check digits and the BBAN pattern, and returns the bank and branch identifier.

curl — validate an IBAN from Spain
curl "https://veriport.io/api/v1/iban/validate?iban=ES9812345678901234567890"

Questions

How long is an IBAN from Spain?
24 characters, written in groups of four on paper (ES98 1234 5678 9012 3456 7890 as a synthetic example).
Can I find the bank from the IBAN?
The bank identifier is the 4 characters at positions 5–8; the bank’s name and BIC are in SWIFT’s licensed directory, which the API does not resolve.
Does a valid IBAN mean the account exists?
No. The check digits and the structure say the IBAN is well formed; existence and ownership are known to the bank only, at payment time.

Free: five checks, bank identifier, SEPA flag.

Check an IBAN

Sources