IBAN format · ES

Spanish IBAN format

The Spanish IBAN format is defined by ISO 13616 and is fixed for every account opened in Spain. A Spanish IBAN is always 24 characters long and uses the structure pattern 4!n4!n1!n1!n10!n: 4 digits (0–9), then 4 digits (0–9), then 1 digit (0–9), then 1 digit (0–9), then 10 digits (0–9). The first two characters are the country code ES, the next two are MOD 97 check digits, and the remaining 20 characters form the BBAN, which Spain divides into 5 fields. This page breaks down each field, shows a worked ES IBAN, and explains how the check digits are computed.

Country code
ES
Total length
24 chars
Check-digit algo
MOD 97-10
ISO 13616 pattern
4!n4!n1!n1!n10!n
4 digits (0–9), then 4 digits (0–9), then 1 digit (0–9), then 1 digit (0–9), then 10 digits (0–9)

Structure breakdown

The Spain BBAN (positions 5–24) is the country-specific part of the IBAN and is 20 characters long. Spain splits it into 5 fields: Field 1 is 4 digits; Field 2 is 4 digits; Field 3 is 1 digit; Field 4 is 1 digit; Field 5 is 10 digits. The exact meaning of each field (bank code, branch, account number) is defined by Spain's national registry and is stable, so a ES IBAN that matches the pattern and length is structurally valid even before the MOD 97 check.

Country code
ISO 3166 — Spain
ES
Check digits
MOD 97-10 checksum
91
BBAN field 1
4 digits · digits (0–9)
2100
BBAN field 2
4 digits · digits (0–9)
0418
BBAN field 3
1 digit · digits (0–9)
4
BBAN field 4
1 digit · digits (0–9)
5
BBAN field 5
10 digits · digits (0–9)
0200051332

The table below applies the 4!n4!n1!n1!n10!n pattern to a real, MOD 97-valid Spain IBAN (ES9121000418450200051332). Each row shows one field of the IBAN — country code, check digits, then the BBAN fields in order — so you can see exactly how a ES IBAN is assembled. This is the same breakdown the IBAN validator produces when you paste a Spain IBAN.

Spanish IBAN check digits

Positions 3–4 of a Spain IBAN hold two MOD 97-10 check digits. ISO 13616 computes them by rearranging the IBAN so the BBAN leads and the country code plus check digits trail, converting letters to numbers (A=10 … Z=35), and taking the giant resulting integer mod 97. The check digits are chosen so the whole IBAN leaves a remainder of 1. If any single character of a ES IBAN is mistyped, the remainder changes and validation fails — which is why the format checker on this page can flag a typo from one wrong digit.

What makes a Spanish IBAN valid

A Spain IBAN is structurally valid only when it passes three independent checks at once. First, the character set: the first two characters must be the letters ES, the next two must be digits, and the BBAN may contain only digits and uppercase letters. Second, the length: a ES IBAN must be exactly 24 characters, because Spain fixes its BBAN at 20 characters and ISO 13616 fixes the country code and check digits at four. Third, the MOD 97 checksum. The 4!n4!n1!n1!n10!n pattern adds one more layer — it confirms the BBAN splits into 5 fields of the right size and type, so a Spain IBAN with the right total length but the wrong internal split still fails. This is why the format checker on this page is stricter than a generic length-only check.

Common Spanish IBAN format mistakes

Most Spain IBAN format errors come from a handful of avoidable mistakes. Pasting a domestic Spain account number instead of the IBAN is the most common — the IBAN always starts with ES and is 24 characters, while a local account number is usually shorter and has no country prefix. Dropping or adding a character when copying from a statement is next; because the length is fixed, even one extra digit fails. Confusing the country code with a similar one (for example ES vs a neighbor) changes both the expected length and the check digits, so the whole IBAN fails. Finally, including spaces in the stored value is harmless for validation but can break payment forms that count characters literally — strip spaces before you submit a ES IBAN to a wire form.

Spanish IBAN and SWIFT codes

When you send or receive an international payment to Spain, the IBAN tells the network which account to credit, and the bank's SWIFT/BIC code tells it which bank holds that account. After checking the ES IBAN format here, open the Spain SWIFT codes page to find the receiving bank's BIC and complete the wire instructions.

Spain IBAN overview →View ES IBAN example →Validate an ES IBAN