DEV Community

Daniel Igel
Daniel Igel

Posted on

Validate & parse IBANs (ISO 13616, 80+ countries) without a paid banking API

A "valid" IBAN isn't just a regex — it's the MOD-97 checksum over a country-specific length and structure. Get that wrong and you accept payment details that bounce later. Most devs either copy a sketchy gist or pay for a banking API they don't otherwise need.

This validates the checksum and structure for 80+ countries, and can parse an IBAN into its parts:

curl --request GET \
  --url 'https://iban-validator-parser-api.p.rapidapi.com/api/v1/validate?iban=DE89370400440532013000' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --header 'x-rapidapi-host: iban-validator-parser-api.p.rapidapi.com'
Enter fullscreen mode Exit fullscreen mode

GET /api/v1/parse?iban=... returns the country, bank code, account number and a pretty-printed form (DE89 3704 0044 0532 0130 00). There's POST /api/v1/validate/batch for up to 100 IBANs, and GET /api/v1/countries for the supported list.

Free tier on RapidAPI: https://rapidapi.com/danieligel/api/iban-validator-parser-api

Built this for a checkout form so I didn't have to vendor MOD-97 logic. What are you using for IBAN checks today?

Top comments (0)