Does anyone know of a reliable way to validate International Bank Account Number (IBAN) and Bank Identifier Code (BIC) in java?
6 Answers
Apache Commons Validator has IBAN validation (since version 1.4)
Home page: http://commons.apache.org/validator/
Maven dependency:
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
</dependency>
Edit: Updated javadoc link.

- 1,742
- 19
- 15
-
The correct link to the javadoc is:http://commons.apache.org/proper/commons-validator/javadocs/api-1.4.0/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.html – drame Oct 20 '14 at 06:46
Apache Commons Validator is good for IBAN validation, but lacks BBAN structure validation (as specified in IBAN registry).
I have just released a library, named jbanking, that might suits your need. It contains routines for both IBAN and BIC validation. You can find it on github (https://github.com/marcwrobel/jbanking).
But note that you cannot have a reliable BIC / IBAN validation without using the IBAN Plus Directory (formely known as the BICplusIBAN Directory) and the Bank directory Plus (formely known as the BIC directory). Both are provided and regularly updated by SWIFT which is the BIC / IBAN registrar. Unfortunately those directories are not available for free.

- 58,560
- 8
- 81
- 72

- 644
- 9
- 19
These might be worth a look:
http://soastation.googlepages.com/iban-checkdigit-src.jar
http://developers.sun.com/docs/javacaps/designing/capsswftintprj.ghfyv.html

- 24,881
- 6
- 47
- 71
-
6Brandon, your first link works fine (just downloads a jar file with no copyright etc, is this what you intended?) The second link though, is broken. Looks like Oracle doesn't like it much. – Johan May 17 '11 at 08:46
iban4j might be good choice for IBAN validation.
home page: https://github.com/arturmkrtchyan/iban4j
Maven dependency:
<dependency>
<groupId>org.iban4j</groupId>
<artifactId>iban4j</artifactId>
<version>1.0.0</version>
</dependency>

- 921
- 9
- 9
-
Hello, I just reviewed and finally decided to use your library. Nice work and simple API. Many thanks for sharing! – javapapo Jun 27 '14 at 18:23
-
1what should be my motivation NOT to use Apache IBAN Validator, if I only want to validate IBAN? – gursahib.singh.sahni Apr 25 '19 at 18:07
-
Above library is outdated, another alternative is https://github.com/barend/java-iban – Sahil Chhabra Feb 24 '20 at 10:55
This is a library of utilities to assist with developing banking functionality. https://github.com/marcwrobel/jbanking

- 11
- 1
This library provides an IBAN class supporting BBAN structure validation.