{"id":29979000,"url":"https://github.com/aheissenberger/bankcode-bic","last_synced_at":"2026-01-20T16:53:58.732Z","repository":{"id":307182851,"uuid":"1028659145","full_name":"aheissenberger/bankcode-bic","owner":"aheissenberger","description":"Convert bank codes from IBAN to BICs, Name of bank. Currently supports only some selected EU countries.","archived":false,"fork":false,"pushed_at":"2025-08-01T14:52:34.000Z","size":208,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-04T07:36:12.939Z","etag":null,"topics":["bankcode","bic","converter","datasets","generator","iban"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aheissenberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"aheissenberger"}},"created_at":"2025-07-29T21:38:17.000Z","updated_at":"2025-08-01T14:52:38.000Z","dependencies_parsed_at":"2025-07-29T23:02:29.437Z","dependency_job_id":"41e362a7-5310-4ce3-a4df-f33c9c92f4a6","html_url":"https://github.com/aheissenberger/bankcode-bic","commit_stats":null,"previous_names":["aheissenberger/bankcode-bic"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/aheissenberger/bankcode-bic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheissenberger%2Fbankcode-bic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheissenberger%2Fbankcode-bic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheissenberger%2Fbankcode-bic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheissenberger%2Fbankcode-bic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aheissenberger","download_url":"https://codeload.github.com/aheissenberger/bankcode-bic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheissenberger%2Fbankcode-bic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006853,"owners_count":26084207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bankcode","bic","converter","datasets","generator","iban"],"created_at":"2025-08-04T12:43:18.269Z","updated_at":"2025-10-11T10:38:34.832Z","avatar_url":"https://github.com/aheissenberger.png","language":"TypeScript","funding_links":["https://github.com/sponsors/aheissenberger"],"categories":[],"sub_categories":[],"readme":"# bankcode-bic\n\nConvert bank codes to BICs and vice versa. Currently supports only banks from the following countries: AT, BE, DE, ES, FR ([see adding support for other countries](#contributing))\nThis libray is an extention to exiting IBAN libraries which can extract the ISO CountryCode and BankCode from an IBAN but cannot provide the BIC, Name and Address of the Bank.\n\nThis library will fetch the list from each country's national bank website. The [function to fetch](./docs/API.md#fetchdata) and the specific implementations per country do not depend on any JavaScript environment which allows to implement this on edge functions in the cloud.\n\nTo convert from IBAN to BIC use one of the many IBAN libraries e.g. [ibankit-js](https://github.com/koblas/ibankit-js) to retrive the BankCode from the IBAN.\n\n## Installation\n\ninstall from npm:\n\n`npm i bankcode-bic # or yarn bankcode-bic, or pnpm add bankcode-bic`\n\n## Usage\n\n### API\n\nFor more details check out the full [API Docs](./docs/API.md).\n\n### Example Implementation\n\nThis is a example nodejs cli app which uses the generated data.\n\n1. generate the data which will create the file `./output/de.js`\n   `npm run bankcode-bic generate --countries de ./output --key-names BankCode --field-names BIC`\n\n2. import the file `./output/de.js` into your application\n\n```js\nimport process from 'node:process'\nimport { keyedGetObject } from 'bankcode-bic'\nimport { bankData } from './output/de.js'\nconst bankCode = process.argv[2]\nconsole.log(keyedGetObject(bankCode, bankData))\n```\n\n3. bundle your application\n\n### Command Line\n\n```\nUsage: bankcode-bic [options] \u003ccommand\u003e\n\nCommands:\n  download \u003cfile\u003e         Download the original CSV source BIC and bank address data to a file\n  generate \u003cdirectory\u003e    Generate a custom import files with relevant data in the specified directory\n  lookup \u003cfile\u003e \u003ckeyName\u003e \u003ckeyValue\u003e   Find the \u003ckeyName\u003e with the \u003ckeyValue\u003e in the specified \u003cfile\u003e.\n                                       You need to create a '\u003cfilename\u003e.js' with the 'generate' command.\n  help                    Show this help message\n\nGlobal Options:\n  --countries \u003ccountry\u003e     Create datasets for countries (e.g., DE, LT)\n  --clear-cache             Clear the cache before downloading data\n  --debug                   Enable debug output\n  --no-cache                Disable caching of downloaded data\n  --cache-ttl \u003cms\u003e          Set cache TTL in milliseconds (default: 24 hours)\n  --quiet                   Suppress output messages\n  -h, --help                Show help\n\nonly for 'generate' command:\n  --field-names \u003cfields\u003e   Comma-separated list of field names to include in the generated file\n  --key-names \u003ckeys\u003e       Comma-separated list of key names to include in the generated file\n  --format \u003cjson|js|ts\u003e    Output format used by generate command (default: '.js')\n\n\nExamples:\n  generate ./output --field-names bic,name --key-names bankcode --countries DE,LT\n  bankcode-bic lookup ./output/de.js bankcode 10010010\n\n```\n\n#### Examples\n\n**generate:** create a dataset with search keys BankCode, BIC and the fields BankCode, BIC, Name.\n\n```sh\n$ bankcode-bic % pnpm bankcode-bic generate --countries de ./output --key-names BankCode --key-names BIC --field-names BankCode --field-names BIC --field-names Name\nDownload URL (cached): https://www.bundesbank.de/resource/blob/926192/bdb8c7e624fa55dd552f73312f6a44db/472B63F073F071307366337C94F8C870/blz-aktuell-csv-data.csv\nFetched data (cached) Size: 1900725 bytes\nParsed data (cached) Size: 3080 rows\n\nSaved dataset for 'de' size 280718 bytes, format 'serialized' to:\noutput/de.js\n```\n\n**lookup:** get BIC, Name of Bank of a german Bank with ISO Country Code `DE` and BankCode `10011001`\n\n```sh\n$ bankcode-bic % pnpm bankcode-bic lookup output/de.js BankCode 10011001\nUsing imported bank data from: output/de.js\nData type: keyed, rows: 3080\nBankCode === 10011001\n{\"BIC\":\"NTSBDEB1XXX\",\"name\":\"N26 Bank\"}\n```\n\n## Configuration\n\n### Cache Directory\n\n**Node:**\nType: files system\nDefault: `./cache`\nEnvironment Variable `CACHE_DIR`\n\n**Browser:**\nType: local storage\nKey: `localcache-meta`\n\n## Datasets\n\nDatasets are published in different formats (csv, csv.gz, xlsx) and do not provide all columns.\n\n| Country      | Source Website                                                                                                                                           | Format | Available Columns (original)                                                                                                                                             |\n| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Austria (AT) | [Österreichische Nationalbank Bankstellenverzeichnis](https://www.oenb.at/en/Statistics/Reporting-Systems/Bank-identifier-code.html)                     | csv    | bankcode (Bankleitzahl), bic (SWIFT-Code), name (Bankenname), street (Straße), postal (PLZ), city (Ort), phone (Telefon), fax (Fax), email (E-Mail), homepage (Homepage) |\n| Belgium (BE) | [National Bank of Belgium Bank Identification Codes](https://www.nbb.be/en/financial-oversight/bank-identification-codes)                                | xlsx   | bankcode (T_Identification_Number), bic (Biccode), name (T_Institutions_English/Dutch/French)                                                                            |\n| Germany (DE) | [Deutsche Bundesbank Bankleitzahlendatei](https://www.bundesbank.de/en/tasks/payment-systems/bank-sort-codes)                                            | csv    | bankcode (Bankleitzahl), bic (BIC), name (Bezeichnung), postal (PLZ), city (Ort)                                                                                         |\n| Spain (ES)   | [European Central Bank Financial Institutions](https://www.ecb.europa.eu/stats/financial_corporations/list_of_financial_institutions/html/index.en.html) | csv.gz | bankcode[[1]](#riadcode2bankcode) (RIAD_CODE), bic (BIC), name (NAME), address (ADDRESS), postal (POSTAL), city (CITY)                                                   |\n| France (FR)  | [European Central Bank Financial Institutions](https://www.ecb.europa.eu/stats/financial_corporations/list_of_financial_institutions/html/index.en.html) | csv.gz | bankcode[[1]](#riadcode2bankcode) (RIAD_CODE), bic (BIC), name (NAME), address (ADDRESS), postal (POSTAL), city (CITY)                                                   |\n\n\u003ca name=\"riadcode2bankcode\"\u003e\u003c/a\u003e[1] Riad Code for France and Spain contains the BankCode after the country code e.g. `RIAD_CODE:FR10128` =\u003e `BankCode:10128`\n\n## Development\n\n- Install dependencies:\n\n```bash\nnpm install\n```\n\n- Run the unit tests:\n\n```bash\nnpm run test\n```\n\n- Build the library:\n\n```bash\nnpm run build\n```\n\n## Know How\n\nHere's a clear and concise overview of **IBAN**, **BIC**, and **RIAD**, along with a table that shows how they relate to each other:\n\n---\n\n### 📘 Table 1: Overview of IBAN, BIC, RIAD\n\n| Code     | Full Name                                             | Purpose                                                       | Who Uses It                 | Publicly Available | Example                       |\n| -------- | ----------------------------------------------------- | ------------------------------------------------------------- | --------------------------- | ------------------ | ----------------------------- |\n| **IBAN** | International Bank Account Number                     | Identifies individual bank accounts for cross-border payments | Customers, banks            | ✅ Yes             | `DE89 3704 0044 0532 0130 00` |\n| **BIC**  | Bank Identifier Code (SWIFT)                          | Identifies a specific bank in international transactions      | Banks, SWIFT network        | ✅ Yes             | `BANKDEFFXXX`                 |\n| **RIAD** | Register of Institutions and Affiliates Database code | Internal regulatory identifier for financial institutions     | ECB, national central banks | ❌ No              | `ECB123456` (fictional)       |\n\n---\n\n### 🔗 Table 2: Relationships Between IBAN, BIC, and RIAD\n\n| From | Can Derive | How                                                                               |\n| ---- | ---------- | --------------------------------------------------------------------------------- |\n| IBAN | → BIC      | Bank code inside IBAN maps to a BIC via national directory (e.g., BLZ in Germany) |\n| BIC  | → RIAD     | Central banks use BIC to locate the RIAD code in internal systems                 |\n| IBAN | → RIAD     | ❌ Not directly; only via BIC and central bank mapping                            |\n\n## Contributing\n\nContributions are welcome! If you want to add support for more countries, improve the code, or fix bugs, please follow these steps:\n\n1. Fork the repository and create a new branch for your feature or fix.\n2. Make your changes and add or update tests as needed.\n3. Run `pnpm test` to ensure all tests pass.\n4. Open a pull request with a clear description of your changes and the motivation behind them.\n\nFor major changes or questions, please open an issue first to discuss what you would like to change.\n\nTo add a country start with copying an existing implementation in `./src/download`.\nRead [Copilot Instructions](./github/copilot-instructions.md) for an overview of the repository.\n\nThank you for helping make this project better!\n\n## Publish to NPM\n\nrun this command and choose the type (major, minor, patch) of release\n`pnpm release`\n\n## TODO\n\n[ ] add more countries\n[ ] use the address data from European Central Bank to enhance datasets with missing address information\n\n## Credits\n\n- [iban-to-bic](https://github.com/sigalor/iban-to-bic)\n\n## License\n\n[MIT](./LICENSE) License © 2025 [Andreas Heissenberger](https://github.com/aheissenberger)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faheissenberger%2Fbankcode-bic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faheissenberger%2Fbankcode-bic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faheissenberger%2Fbankcode-bic/lists"}