Validar y calcular IBANValidate and build IBAN

Comprueba si un IBAN está bien formado (cualquier país) y construye el IBAN español a partir del código de cuenta. Todo en tu navegador: no se envía ni se guarda nada. Check whether an IBAN is well-formed (any country) and build the Spanish IBAN from the account number. Everything in your browser: nothing is sent or stored.

API — uso libre y gratuitoAPI — free and open to use
GET https://sergiocomeron.com/api/iban/?iban=ES9121000418450200051332
ParámetroValoresValuesDescripciónDescription
ibanIBANValida el dígito de control (mód. 97)Validates the check digit (mod 97)
ccc20 dígitos20 digitsCalcula el IBAN español desde el código de cuentaBuilds the Spanish IBAN from the account code
curl "https://sergiocomeron.com/api/iban/?iban=ES9121000418450200051332"

Usa iban para validar o ccc para calcular. Límite: 300 peticiones/hora. CORS abierto.Use iban to validate or ccc to compute. Limit: 300 requests/hour. Open CORS.

Cómo funcionaHow it works

La validación sigue el estándar ISO 13616: se mueven los cuatro primeros caracteres (país y control) al final, se sustituye cada letra por un número (A=10 … Z=35) y se comprueba que el número gigante resultante, módulo 97, sea igual a 1. Un IBAN español tiene 24 caracteres: ES + 2 de control + 20 de cuenta (entidad, oficina, control interno y número). Validation follows the ISO 13616 standard: move the first four characters (country and check) to the end, replace each letter with a number (A=10 … Z=35) and check that the resulting huge number, modulo 97, equals 1. A Spanish IBAN has 24 characters: ES + 2 check digits + 20 account digits.

Validar el formato no confirma que la cuenta exista. Para generar IBAN de prueba válidos, usa el generador de datos falsos; para validar documentos, el validador de NIF/NIE/CIF. Validating the format doesn't confirm the account exists. To generate valid test IBANs use the fake-data generator; to validate documents, the NIF/NIE/CIF validator.

Preguntas frecuentesFrequently asked questions

¿Cómo se valida un IBAN?How is an IBAN validated?

Se mueven los 4 primeros caracteres al final, se cambian las letras por números (A=10 … Z=35) y se comprueba que el resultado módulo 97 sea 1 (ISO 13616).You move the first 4 characters to the end, swap letters for numbers (A=10 … Z=35) and check the result modulo 97 equals 1 (ISO 13616).

¿Cuántos dígitos tiene un IBAN español?How many digits does a Spanish IBAN have?

24 caracteres: ES + 2 de control + 20 de cuenta (4 entidad, 4 oficina, 2 control interno y 10 número de cuenta).24 characters: ES + 2 check digits + 20 account digits (4 bank, 4 branch, 2 internal check, 10 account number).

¿Se envían o guardan los datos?Is the data sent or stored?

No. Todo el cálculo ocurre en tu navegador con JavaScript. Nada viaja al servidor.No. All the calculation happens in your browser with JavaScript. Nothing goes to the server.

¿Validar el IBAN significa que la cuenta existe?Does a valid IBAN mean the account exists?

No. El dígito de control solo verifica que el IBAN está bien formado, no que la cuenta exista o esté activa.No. The check digit only verifies the IBAN is well-formed, not that the account exists or is active.