IBAN Toolkit logoIBAN Toolkit

Spain IBAN Generator

Free test ES IBANs: 24 characters, official registry format, valid check digits.

Spain IBAN generator

24-character format, official registry structure.

Same country + seed + row order gives the same test values. Leave blank for random samples. Seed algorithm: v1. Do not enter personal data.

Spain IBAN format

A Spain IBAN is 24 characters long: the ES country code, 2 check digits, and a 20-character BBAN (4 digits + 4 digits + 1 digits + 1 digits + 10 digits). Here is how a generated test IBAN breaks down:

PartExampleFormat
Country codeES2 letters (ISO 3166)
Check digits522 digits: mod-97 checksum
Bank code31424 digits
Branch code72254 digits
Account number6718959232201 digits + 1 digits + 10 digits

Full test IBAN: ES52 3142 7225 6718 9592 3220 (random test value)

About Spain IBANs

  • Spain's 24-character IBAN: 4-digit bank code + 4-digit branch + 2 national check digits + 10-digit account number.
  • Those 2 national check digits (dígitos de control) are computed with a weighted mod-11 algorithm: Spain validates twice, nationally and internationally.
  • The old 20-digit CCC (Código Cuenta Cliente) is exactly the Spanish BBAN.

Use test Spain IBANs for

  • Testing payment forms that accept Spain bank details.
  • QA fixtures and demo data with the correct 24-character structure.
  • Validating your own mod-97 implementation against known-correct outputs.

Banking in Spain: how the IBAN is used

Spain's IBAN is a wrapper around the older CCC (Código Cuenta Cliente), the 20-digit domestic account code Spaniards used long before SEPA. The Banco de España assigns the four-digit entity codes, and the market is concentrated: a handful of large groups — Santander, BBVA, CaixaBank and Sabadell — handle most accounts after a decade of mergers absorbed dozens of regional savings banks (cajas). Every domestic transfer in Spain uses the 24-character IBAN; the CCC survives as the IBAN's inner structure rather than as a separate number customers quote.

How to read a Spain IBAN

Strip ES and the two check digits away and a Spanish IBAN is exactly the 20-digit CCC: four digits for the bank (entidad), four for the branch (oficina), then two national control digits (dígitos de control), then the ten-digit account number. The first control digit is computed over the bank and branch codes, the second over the account number, using a weighted mod-11 algorithm — a domestic layer entirely separate from the IBAN's mod-97 check digits.

The worked example in the format table above — ES52 3142 7225 6718 9592 3220 — follows exactly this pattern.

Major banks in Spain

  • Banco Santander — Spain's largest bank and a global retail group
  • BBVA — the second major group, headquartered in Bilbao
  • CaixaBank — the largest domestic retail network after absorbing Bankia
  • Banco Sabadell — strong in business and SME banking
  • Bankinter — mid-sized listed bank known for digital services
  • Unicaja Banco — rooted in the Andalusian savings-bank sector

Common Spain IBAN mistakes

  • Omitting the two control digits when rebuilding an IBAN from an old CCC printout — the CCC is 20 digits, not 18.
  • Padding the account number wrongly: the account field is fixed at ten digits inside the CCC, padded with leading zeros.
  • Assuming a defunct caja's bank code is invalid: merged savings banks' codes often live on in migrated accounts.
  • Validating only mod-97: a Spanish IBAN can pass internationally while its CCC control digits are wrong, which Spanish systems will reject.

Country-specific testing notes

Spanish fixtures should include a case with correct mod-97 but deliberately broken CCC control digits — Spanish-aware validators must fail it even though generic ones pass it. Also test a 20-digit CCC pasted into an IBAN field (missing ES and check digits), and bank codes of institutions that no longer exist independently, which remain common in legacy data.

What format checks can and cannot tell you

Our checks cover the Spanish IBAN's length, digit pattern and international checksum. They do not recompute the two CCC control digits and do not confirm that an entidad code is currently active. For payment-grade assurance on Spanish accounts, pair format validation with a check-digit verification of the CCC itself.

More countries

Frequently asked questions

24 characters: ES + 2 check digits + 20-character BBAN (the former CCC account code).
Two national check digits inside the Spanish BBAN, computed with a weighted mod-11 algorithm over the bank, branch and account numbers.
They are synthetic test values with valid structure and check digits. This site does not query live bank directories, so generated values are not guaranteed to be unassigned.
Yes: paste any Spain IBAN into our IBAN validator to check its length, structure and mod-97 checksum.
Almost — the IBAN is the CCC with ES and two international check digits in front. If you have a full 20-digit CCC you already hold everything except the prefix and checksum.
Two different systems: the IBAN's own mod-97 pair after ES, and the older CCC's two mod-11 control digits inside the BBAN. Both must be right for Spanish payments to succeed.
Testing and educational use. Generated identifiers are synthetic and are not checked against live bank directories. A randomly generated value can coincidentally resemble or match a real identifier. Never use generated data for real payments, account applications, identity verification, or to represent a real person or institution.