IBAN Validator
Validate IBAN numbers and extract the bank code and account number. Supports all countries in the official SWIFT IBAN Registry. Returns a structured response for both valid and invalid IBANs β the valid field tells you whether the IBAN passed checksum validation.
Overview
Use Cases
- Payment form validation before submission
- Fintech apps processing international bank transfers
- Fraud detection pipelines verifying account details
- Accounting software importing supplier bank details
- KYC / AML workflows verifying customer bank accounts
Features
ISO 13616 checksum validation (mod-97 algorithm)
Country-specific length validation for ~80 countries
Bank code extraction (Bankleitzahl, sort code, etc.)
Account number extraction from the BBAN
Accepts IBANs with or without spaces
Case-insensitive input
Always returns 200 β the valid field signals pass/fail
API Endpoints
Validate IBAN
Validates an IBAN and returns the country, bank code, and account number. Spaces in the input are stripped automatically. Always returns HTTP 200 β check the valid field to determine whether the IBAN is valid.
GET
https://api.requiems.xyz/v1/finance/iban/{iban}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| iban | string |
Required | The IBAN to validate. Spaces are stripped. Case-insensitive. |
Try it out
Live DemoRequest
The IBAN to validate. Spaces are stripped. Case-insensitive.
Sending request...
Response Fields
| Field | Type | Description |
|---|---|---|
| iban | string |
The normalised IBAN (spaces stripped, uppercased) |
| valid | boolean |
true if the IBAN passed length and ISO 13616 checksum validation |
| country | string |
Full country name (empty if the country code is not in the registry) |
| bank_code | string |
Bank identifier extracted from the BBAN (empty if country not in registry or positions not defined) |
| account | string |
Account number extracted from the BBAN (empty if country not in registry or positions not defined) |
Code Examples
curl "https://api.requiems.xyz/v1/finance/iban/DE89370400440532013000" \
-H "requiems-api-key: YOUR_API_KEY"
# With spaces (URL-encoded):
curl "https://api.requiems.xyz/v1/finance/iban/DE89%203704%200044%200532%200130%2000" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
iban = "DE89370400440532013000"
url = f"https://api.requiems.xyz/v1/finance/iban/{iban}"
headers = {"requiems-api-key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
data = response.json()["data"]
if data["valid"]:
print(f"Country: {data['country']}")
print(f"Bank code: {data['bank_code']}")
print(f"Account: {data['account']}")
else:
print("Invalid IBAN")
const iban = "DE89370400440532013000";
const response = await fetch(
`https://api.requiems.xyz/v1/finance/iban/${iban}`,
{ headers: { 'requiems-api-key': 'YOUR_API_KEY' } }
);
const { data } = await response.json();
if (data.valid) {
console.log(`Country: ${data.country}`);
console.log(`Bank code: ${data.bank_code}`);
console.log(`Account: ${data.account}`);
} else {
console.log('Invalid IBAN');
}
require 'net/http'
require 'json'
iban = "DE89370400440532013000"
uri = URI("https://api.requiems.xyz/v1/finance/iban/#{iban}")
request = Net::HTTP::Get.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)['data']
if data['valid']
puts "Country: #{data['country']}"
puts "Bank code: #{data['bank_code']}"
puts "Account: #{data['account']}"
else
puts "Invalid IBAN"
end
Error Responses
internal_error
Unexpected server error (e.g. database unreachable).
Frequently Asked Questions
The API always returns HTTP 200. Set valid: false in the data object means the IBAN failed length or checksum validation. Check the valid field rather than the HTTP status code.
ISO 13616 mod-97. The first 4 characters are moved to the end of the string, each letter is replaced by its numeric equivalent (A=10 β¦ Z=35), and the resulting integer is divided by 97. A remainder of 1 means the IBAN is valid.
All countries in the official SWIFT IBAN Registry β approximately 80 countries. The registry data is seeded from the php-iban project, a maintained mirror of the SWIFT IBAN Registry.
bank_code and account are extracted using the bank identifier and account positions from the SWIFT IBAN Registry. If the country is not in the registry, or the registry does not define explicit positions for that country, these fields will be empty even though the IBAN is valid.
Yes. Spaces are stripped automatically before validation. DE89 3704 0044 0532 0130 00 and DE89370400440532013000 are treated identically.