Generate BIC from IBAN bank account number

Tim picture Tim · Oct 30, 2012 · Viewed 51.1k times · Source

Is there any existing library or script I can use to generate the BIC code from an IBAN bank account number (and other necessary information)?

I've searched the web, but found only IBAN generators.

Thanks in advance!

Answer

Kiddo picture Kiddo · Apr 10, 2017

Found solution for all IBAN accounts (I think):

https://openiban.com/validate/IBAN_NUMBER?getBIC=true

If you make a CURL call for example to that URL, you will get the Account bank info for free. Replace IBAN_NUMBER with your IBAN account.

Example:

`https://openiban.com/validate/DE89370400440532013000?getBIC=true`

Result:

{
  "valid": true,
  "messages": [],
  "iban": "DE89370400440532013000",
  "bankData": {
    "bankCode": "37040044",
    "name": "Commerzbank",
    "zip": "50447",
    "city": "Köln",
    "bic": "COBADEFFXXX"
  },
  "checkResults": {}
}

Important Update

OpenIBAN has shut down it's API service due to the GDPR regulations posing unknown risks on the service provider. See the statement on openIBAN.com. There is also a link to a self-hosting guide included, see this github page.

Update (2019/07/25)

Openiban is back online.