reliable way to validate IBAN/BIC in java

Apache Commons Validator has IBAN validation (since version 1.4)

Home page: http://commons.apache.org/validator/

Javadoc: https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.html

Maven dependency:

<dependency>
  <groupId>commons-validator</groupId>
  <artifactId>commons-validator</artifactId>
  <version>1.7</version>
</dependency>

Edit: Updated javadoc link.


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.

Tags:

Java

Banking