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.
Using the IBAN Validator API
TinyFn provides a simple endpoint to validate IBANs:
GET https://api.tinyfn.io/v1/validate/iban?iban=DE89370400440532013000
Headers: X-API-Key: your-api-key
{
"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
- Format consistently: Remove spaces and convert to uppercase before validation
- Validate early: Check IBAN validity before processing payments
- Display formatted: Show IBANs in groups of 4 for readability
- 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