1. Normalize the input
Spaces are removed and the representation is normalized.
🇪🇸 IBAN COUNTRY PROFILE · Spain
An IBAN for Spain always contains 24 characters. After ES and two IBAN check digits, the national BBAN contains 4-character bank identifier, 4-character branch identifier, 10-character account part and 2-character national check digit. IBAN-Test can additionally compare the bank identifier with the available bank directory for Spain.
The reference example ES91 2100 0418 4502 0005 1332 shows the country-specific components. It is provided for explanation only and is not a request to make a payment.
| Position | Length | Component | Format |
|---|---|---|---|
| 1–2 | 2 | Country code | Letters: ES |
| 3–4 | 2 | IBAN check digits | Digits |
| 5–8 | 4 | Bank identifier | Digits |
| 9–12 | 4 | Branch identifier | Digits |
| 13–14 | 2 | National check digit | Digits |
| 15–24 | 10 | Account part | Digits |
This validator accepts only IBANs from the selected country.
Validation covers normalization, country assignment, the fixed 24-character length, the country-specific segment structure and MOD-97. Account ownership and real-time account existence are not checked.
Spaces are removed and the representation is normalized.
ES, the length and the segment sequence are checked.
The international checksum catches many typing errors.
The bank identifier is compared with the available directory.
| Validation step | Available | Details |
|---|---|---|
| Country, length and structure | Yes | ES, 24 characters; 4-character bank identifier, 4-character branch identifier, 10-character account part and 2-character national check digit. |
| MOD-97 checksum | Yes | Mathematical IBAN validation. |
| Known bank identifier | Yes | Compared with the available bank directory for Spain. |
| National account check | No | No additional national account check method. |
| Bank details and BIC | When available | Returned from the available bank directory. |
| IBAN name check | No | No comparison between an account holder’s name and the IBAN. |
| Account existence | No | No request is sent to the account-holding institution. |
The same validation is available through the REST API. The IBAN is sent in the request and is not placed in a public, indexable URL.
curl --get 'https://www.iban-test.eu/api/v2/iban/validate' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'iban=ES91 2100 0418 4502 0005 1332'When available, the response can include bank details from the country-specific directory.
The generator accepts up to 4 characters for bankcode and 16 characters for accountnumber. It then calculates the IBAN check digits and validates the result.
curl --get 'https://www.iban-test.eu/api/v2/iban/generate' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'countrycode=ES' \
--data-urlencode 'bankcode=2100' \
--data-urlencode 'accountnumber=0418450200051332'Formal validity is a strong signal against input errors, but it is not real-time confirmation of an account.
The account may be closed or unreachable.
A person or company name is not compared with the IBAN.
A valid IBAN does not guarantee that a payment will be accepted.
Results depend on the bank directory currently available to IBAN-Test.
Privacy: The input is transmitted only for validation and is not placed in the page URL.
Bank data validation
For these countries, we check IBANs against available bank directories and return bank details such as institution, city and BIC when available.
IBAN syntax check
Check IBANs for a valid structure, correct length and checksum. This helps you catch typos and transposed digits before a payment fails. Additional bank validation against real bank directories is available for the countries listed above.
API and automation
Validate IBANs in payment forms, SaaS products, SEPA workflows and AI agents. Use the REST API for automation or connect AI clients through MCP.
MCP Server for AI Agents - Connect AI clients to IBAN validation tools - https://www.iban-test.eu/mcp - MCP Documentation