Gathering detailed insights and metrics for @tapraise/ibantools-germany
Gathering detailed insights and metrics for @tapraise/ibantools-germany
Gathering detailed insights and metrics for @tapraise/ibantools-germany
Gathering detailed insights and metrics for @tapraise/ibantools-germany
IBAN Validator and Generator for German Bank Accounts
npm install @tapraise/ibantools-germany
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
13 Stars
99 Commits
3 Forks
1 Watching
3 Branches
2 Contributors
Updated on 23 Nov 2024
TypeScript (99.64%)
JavaScript (0.34%)
Shell (0.02%)
Cumulative downloads
Total Downloads
Last day
-75%
2
Compared to previous day
Last week
-91.7%
15
Compared to previous week
Last month
222%
982
Compared to previous month
Last year
0%
1,374
Compared to previous year
22
This TypeScript/JavaScript library validates IBAN and German bank account numbers. It can be used standalone or as an enhancement of IBAN validators, like IBANTools.
If you need German bank data in your project, e.g., to auto-fill forms when a user enters an IBAN, take a look at the side project BankData-Germany.
Version 1.2403.* includes data from 2024-09-09 to 2024-12-08, as well as from 2024-12-09 to 2025-03-02. Validation will be based on the data that is valid according to your system time (data changes at midnight CET on 2024-12-09).
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.
1$ npm install --save ibantools-germany@latest 2# or 3$ yarn add ibantools-germany@latest
If you only want the functions in your browser, you can include the following pre-built file.
1<script src="https://cdn.jsdelivr.net/npm/ibantools-germany/dist/build/browser.js"></script>
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
.
You can validate the bank account number and BLZ (Bankleitzahl = bank sort code), a BBAN, or an IBAN. Additionally, you have the option to restrict IBAN validation to only allow German IBANs.
1import { isValidAccountNumberBLZ, isValidBBAN, isValidIBAN } from "ibantools-germany" 2 3isValidAccountNumberBLZ("9290701", "10220500"); // true 4 5isValidBBAN("102205000009290701"); // true 6isValidBBAN("20041010050500013M02606"); // false (valid but not a German BBAN) 7 8isValidIBAN("DE23102205000009290701"); // true 9isValidIBAN("FR1420041010050500013M02606"); // true 10isValidIBAN("FR1420041010050500013M02606", false); // false (only allow German IBAN)
1import { generateBBAN, generateIBAN } from "ibantools-germany" 2 3generateBBAN("9290701", "10220500"); // 102205000009290701 4generateBBAN("foo", "bar"); // null 5 6generateIBAN("9290701", "10220500"); // DE23102205000009290701 7generateIBAN("foo", "bar"); // null
When using the pre-built version, the ibantoolsGermany
object is globally
defined on the window
, containing the functions.
1ibantoolsGermany.generateBBAN("9290701", "10220500"); 2ibantoolsGermany.generateIBAN("9290701", "10220500"); 3ibantoolsGermany.isValidAccountNumberBLZ("9290701", "10220500"); 4ibantoolsGermany.isValidBBAN("102205000009290701"); 5ibantoolsGermany.isValidIBAN("DE23102205000009290701");
Unfortunately, there isn't a single algorithm to verify all German bank account numbers or BBANs, as each bank employs its own method(s) which can change periodically. To address this, Deutsche Bundesbank 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.
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.
No vulnerabilities found.
No security vulnerabilities found.