Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 & 2Country (ISO)2 lettersSovereign country code of Spain (ISO 3166-1 alpha-2)ES
3 & 4SEPA Check2 digitsInternational SEPA check digits computed via Modulo 9791
5 to 8Bank Entity4 digitsFinancial institution code registered at Banco de España0049
9 to 12Branch Code4 digitsBank branch / office identifier1500
13 & 14CCC Control2 digitsNational control digits (1st for bank/branch, 2nd for account)05
15 to 24Account Number10 digitsIndividual bank checking account number1234567890

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. 1. Compute 1st national check digit (CD1) using weights [1, 2, 4, 8, 5, 10, 9, 7, 3, 6] on "00" + Bank + Branch.
  2. 2. Compute 2nd national check digit (CD2) using the same weights on the 10-digit account number.
  3. 3. Apply exception rules: if 11 - remainder = 10, digit is 1; if 11 - remainder = 11, digit is 0.
  4. 4. Validate international SEPA check digits by moving "ES" (converted to 1428) to the end and evaluating BigInt Modulo 97.
  5. 5. The remainder of the complete 24-character expression must equal 1.

Frequently Asked Questions & Technical Guidelines