Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bankdata-germany

baumerdev6.3kAGPL1.2501.0TypeScript support: included

Data and BIC Validator for German Banks

iban, sepa, bban, bank, bic, validator, germany, bankleitzahl, blz

readme

BankData-Germany: Data and BIC Validator for German Banks.

CI: Lint, test and build Coverage Status

This TypeScript/JavaScript library contains bank data for German banks, such as names and BIC/SWIFT codes. You can use it (for example) to enhance user interfaces/forms, where a user enters an IBAN and you automatically fill out the bank name and BIC fields.

This library is not an IBAN validator itself. If you require validation, please refer to the main project. IBANTools-Germany.

Version 1.2501.* includes data from 2025-03-03 to 2025-06-08, as well as from 2025-06-09 to 2025-09-07. Bank data will be valid according to your system time (data changes at midnight CEST on 2025-06-09).

Installation

Package Manager

Add it to your project using a package manager like npm or yarn. You should explicitly install the latest version, as the bank data may change multiple times a year.

$ npm install --save bankdata-germany@latest
# or
$ yarn add bankdata-germany@latest

Browser / CDN

If you only want the functions in your browser, you can include the following pre-built file.

<script src="https://cdn.jsdelivr.net/npm/bankdata-germany/dist/build/browser.js"></script>

Usage

The npm package contains the code for both ESM and CJS. Therefore, in addition to using import as shown in the usage examples below, you can also utilize require.

IBAN / Bank Details

You can retrieve detailed information for a bank using BLZ, BBAN, or IBAN.

Note: When using the BBAN/IBAN function, no verification will be performed. It solely extracts the BLZ and verifies its existence.

import { bankDataByBLZ, bankDataByBIC, bankDataByBBAN, bankDataByIBAN } from "bankdata-germany"

bankDataByBLZ("10010010");
bankDataByBIC("PBNKDEFFXXX");
bankDataByBBAN("100100100000138301");
bankDataByIBAN("DE48100100100000138301");
// {
//   bankName: "Postbank Ndl der Deutsche Bank",
//   bic: "PBNKDEFFXXX",
//   blz: "10010010"
// }

Validation

You can validate BIC/SWIFT codes. However, despite these formats being international standards, this library exclusively validates data for Germany and will return "false" for all other countries.

import { isValidBIC } from "bankdata-germany"

isValidBIC("MARKDEFF"); // true
isValidBIC("MARKDEFFXXX"); // true
isValidBIC("foobar"); // false (invalid format)
isValidBIC("BNPAFRPH"); // false (corrent but not a German BIC)

Browser / CDN

When using the pre-built version, the bankdataGermany object is globally defined on the window, containing the functions.

bankdataGermany.bankDataByBLZ("10010010");
bankdataGermany.bankDataByBIC("PBNKDEFFXXX");
bankdataGermany.bankDataByBBAN("100100100000138301");
bankdataGermany.bankDataByIBAN("DE48100100100000138301");
bankdataGermany.isValidBIC("MARKDEFF");

Data Source

Bank data is sourced from the official website of Deutsche Bundesbank which publishes updated data every quarter.

These updates can encompass both technical changes, such as modifications in check digit methods, as well as content changes like alterations to BLZ, bank names, and more. Some updates might not contain any relevant changes for this library at all.

Package Version

The version numbers are based on Semantic Versioning with some modifications.

1.2205.3

The first number represents the Major version. If this number increases, there may be updates that are not backward compatible, requiring adjustments to your code. In the above version string, the major version is 1.

The first two digits of the second number indicate the year of the included data and check digit methods. The third and fourth digits increase either with minor version changes that maintain backward compatibility or when new data is included. In the provided version string, the year is 2022, with a few minor updates, possibly including data updates for spring and summer.

The last number is reserved for patches and bug fixes.

Considering that the data could change up to four times a year, it's advisable to use an appropriate version string in your package.json. As breaking changes occur only when the first number changes, specifying something like "1.x" should suffice.

changelog

Changelog

2025-05-20 [v1.2501.0]

  • Additionally includes data valid from 2025-06-09, removes data valid before 2025-03-03

2025-02-09 [v1.2500.0]

  • Additionally includes data valid from 2025-03-03, removes data valid before 2024-12-09

2024-11-21 [v1.2403.1]

  • Add missing main entry point to package.json

2024-11-20 [v1.2403.0]

  • Additionally includes data valid from 2024-12-09, removes data valid before 2024-09-09
  • Upgraded dependencies
  • Fixed package.json syntax
  • Added Node 22 to pipeline, dropped Node 16 pipeline

2024-08-11 [v1.2402.0]

  • Additionally includes data valid from 2024-09-09, removes data valid before 2024-06-03

2024-05-20 [v1.2401.0]

  • Additionally includes data valid from 2024-06-03, removes data valid before 2024-03-04

2024-02-17 [v1.2400.0]

  • Additionally includes data valid from 2024-03-04, removes data valid before 2023-12-04

2024-01-30 [v1.2303.1]

  • Update package.json exports for TypeScript >4.7 ; #1
  • Add method for retrieving data by BIC ; #2

2023-11-14 [v1.2303.0]

  • Additionally includes data valid from 2023-12-04, removes data valid before 2023-09-04

2023-08-23 [v1.2302.0]

  • Additionally includes data valid from 2023-09-04, removes data valid before 2023-06-05

2023-05-14 [v1.2301.0]

  • Additionally includes data valid from 2023-06-05, removes data valid before 2023-03-06

2023-05-14 [v1.2300.1]

  • Upgrade dependencies, including yaml, see CVE-2023-2251

2023-02-23 [v1.2300.0]

  • Additionally includes data valid from 2023-03-06, removes data valid before 2022-12-05

2023-02-23 [v1.2201.2]

  • Upgrade dependencies, including http-cache-semantics, see CVE-2022-25881 and cacheable-request, see GHSA-8x6c-cv3v-vp6g

2023-01-20 [v1.2201.1]

  • Fix failing test for current/next BLZs
  • Upgrade dependencies, including json5, see CVE-2022-46175

2022-11-24 [v1.2201.0]

  • Additionally includes data valid from 2022-12-05

2022-10-26 [v1.2200.0]

  • First release