IBAN Validator API: The Complete Guide

Need to validate international bank account numbers in your application? This guide covers everything you need to know about IBAN validation via API, including IBAN structure, validation algorithms, and implementation examples in multiple languages.

What is an IBAN?

An IBAN (International Bank Account Number) is an internationally agreed system of identifying bank accounts across national borders. It was originally adopted by the European Committee for Banking Standards and later became an international standard under ISO 13616.

A typical IBAN looks like this: DE89370400440532013000 (German IBAN)

IBAN Structure Explained

An IBAN consists of several components:

Country Code

The first two letters identify the country (e.g., DE for Germany, GB for United Kingdom, FR for France).

Check Digits

Two digits that enable validation of the IBAN using the MOD-97 algorithm as defined in ISO 7064.

Basic Bank Account Number (BBAN)

The remaining characters contain country-specific bank and account identification. Length varies by country.

Note: IBAN length varies by country - Germany has 22 characters, UK has 22, France has 27, and Spain has 24.

Using the IBAN Validator API

TinyFn provides a simple endpoint to validate IBANs:

API Request
GET https://api.tinyfn.io/v1/validate/iban?iban=DE89370400440532013000
Headers: X-API-Key: your-api-key
Response
{
  "valid": true,
  "iban": "DE89370400440532013000",
  "country_code": "DE",
  "country_name": "Germany",
  "check_digits": "89",
  "bban": "370400440532013000",
  "bank_code": "37040044"
}

Parameters

Parameter Type Description
iban string IBAN to validate (required)

Code Examples

JavaScript / Node.js

const response = await fetch(
  'https://api.tinyfn.io/v1/validate/iban?iban=DE89370400440532013000',
  { headers: { 'X-API-Key': 'your-api-key' } }
);
const result = await response.json();
console.log(result.valid); // true
console.log(result.country_name); // "Germany"

Python

import requests

response = requests.get(
    'https://api.tinyfn.io/v1/validate/iban',
    params={'iban': 'DE89370400440532013000'},
    headers={'X-API-Key': 'your-api-key'}
)
result = response.json()
print(result['valid'])  # True
print(result['country_name'])  # "Germany"

cURL

curl "https://api.tinyfn.io/v1/validate/iban?iban=DE89370400440532013000" \
  -H "X-API-Key: your-api-key"

Common Use Cases

  • International Payments: Validate IBANs before initiating SEPA transfers
  • Banking Applications: Verify customer bank account details
  • E-commerce: Accept international bank transfers as payment method
  • Data Quality: Clean and validate banking data in databases
  • Compliance: Ensure correct IBAN format for regulatory requirements

Best Practices

  1. Format consistently: Remove spaces and convert to uppercase before validation
  2. Validate early: Check IBAN validity before processing payments
  3. Display formatted: Show IBANs in groups of 4 for readability
  4. Store securely: Treat IBANs as sensitive financial data

Try the IBAN Validator API

Get your free API key and start validating IBANs in seconds.

Get Free API Key

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key