Spanish IBAN Validator
Validate the authenticity, format, and checksum of Spanish IBAN.
About Spanish IBAN Validation
The Spanish IBAN is the international bank account number used in Spain, composed of the ES prefix followed by 22 numeric digits.
This tool generates and validates Spanish IBANs, computing both internal branch control keys and the global Modulo 97 checksum.
Anatomy & Structure of Spanish IBAN
The Spanish IBAN (ISO 13616) contains 24 characters embedding the national CCC code:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | Country (ISO) | 2 letters | Sovereign country code of Spain (ISO 3166-1 alpha-2) | ES |
| 3 & 4 | SEPA Check | 2 digits | International SEPA check digits computed via Modulo 97 | 91 |
| 5 to 8 | Bank Entity | 4 digits | Financial institution code registered at Banco de España | 0049 |
| 9 to 12 | Branch Code | 4 digits | Bank branch / office identifier | 1500 |
| 13 & 14 | CCC Control | 2 digits | National control digits (1st for bank/branch, 2nd for account) | 05 |
| 15 to 24 | Account Number | 10 digits | Individual bank checking account number | 1234567890 |
Spanish IBAN Validation Algorithm (Double Verification: Modulo 11 + Modulo 97)
Spanish IBAN combines national CCC check with international SEPA verification:
CD = 11 - (sum(d_i * [1,2,4,8,5,10,9,7,3,6]) % 11) | SEPA = 98 - (BigInt % 97)
- 1. Compute 1st national check digit (CD1) using weights [1, 2, 4, 8, 5, 10, 9, 7, 3, 6] on "00" + Bank + Branch.
- 2. Compute 2nd national check digit (CD2) using the same weights on the 10-digit account number.
- 3. Apply exception rules: if 11 - remainder = 10, digit is 1; if 11 - remainder = 11, digit is 0.
- 4. Validate international SEPA check digits by moving "ES" (converted to 1428) to the end and evaluating BigInt Modulo 97.
- 5. The remainder of the complete 24-character expression must equal 1.