Fast, allocation-free, zero-dependency Java tooling for IBAN, BIC and German bank account validation.
We build iban-commons, a Java library for parsing, validating and formatting IBANs (ISO 13616) and BICs (ISO 9362). It covers 127 countries, runs on Java 8 and Android, and the core has no dependencies outside the JDK. Validation does not allocate, which makes it a good fit for batch processing, payment pipelines and anything else that checks a lot of account numbers.
Add it with Maven (use the current version from the Maven Central badge in place of X.Y.Z):
<dependency>
<groupId>de.speedbanking</groupId>
<artifactId>iban-commons</artifactId>
<version>X.Y.Z</version>
</dependency>Iban iban = Iban.of("DE91100000000123456789"); // throws InvalidIbanException
Optional<Iban> maybe = Iban.tryParse(input); // no exception
boolean valid = Bic.isValid("DEUTDEFFXXX");
iban.getBankCode(); // "10000000"
iban.toFormattedString(); // "DE91 1000 0000 0123 4567 89"| Artifact | What it does |
|---|---|
iban-commons |
IBAN and BIC models, validation, formatting, builder with national check digits, country and currency metadata |
iban-commons-bankdata |
BIC and bank name by IBAN or bank code (DE, AT, CH, CZ, BE, PL, NL, ES, FR), bundled offline data with background refresh |
iban-commons-de-checkdigit |
German account number (Kontonummer) check digit methods per Bankleitzahl, standalone |
iban-commons-validation |
Jakarta Bean Validation constraints @ValidIban and @ValidBic |
iban-commons-junit |
JUnit 5 sources for parameterized tests over countries and random IBANs |
Compared with the other Java IBAN libraries (iban4j, jbanking, Apache Commons Validator, garvelink iban), iban-commons leads in throughput, allocates no memory during validation and supports more countries, while staying free of dependencies. The JMH setup and current results are in iban-commons-benchmarks.
Questions and ideas are welcome in Discussions, bugs go to the issue tracker. If iban-commons is useful to you, a star helps others find it.