Brian Dunning's FileMaker Custom Functions

CheckIBAN ( IBAN )

Checks whether the IBAN is correct or not

  Average rating: 4.1 (47 votes) Log in to vote

Christoph Kaufmann   Christoph Kaufmann - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
CH65 0900 0000 3011 5642 8
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

International Bank Account Numbers (IBAN) start with the country code and two figures, such as CH12. The function checks whether the these figures are correct or not. If not, the function returns 0. In that case, the IBAN is not correct and any attempt to make a payment with this IBAN will fail.



Ralph Nusser   Ralph Nusser, Switzerland
Mar 12, 2009
Alternative calculation at:
V 1.2 April 2007
Autor: Klaus-Dieter Brügmann, <> August 2006
Apr 15, 2012
Danke for your work. I put the function in my database and it works fine.
Uf widerluege.
Chrystel   Chrystel, Antibes
Jul 22, 2013
Sorry I do not speak English.
My problem: I need to create a function to calculate the IBAN key and I am a beginner in Filemaker. My company uses an old version of Filemaker is 5.5 pro FM. Can you help me? Thank you in advance.
wwdto   wwdto, munich
Feb 17, 2014
Works fine, but returns 1, even when DE-IBANs are too long with appended zeros.
Arjen van der Ree   Arjen van der Ree, Amsterdam
Apr 9, 2014
Great Work Christof,

this IBAN check works also on dutch IBAN-codes. Those are a little different from Swiss or German codes because they have 2 books with letters in them: e.g. NL75INGB0005151989.

Your code was simple and spot-on !

Arjen van der Ree
Christoph Kaufmann   Christoph Kaufmann,
Jan 15, 2015
Changes on Jan 15, 2015:
- use local variables instead of script ($) variables
- Allow all characters except spaces since I need to check them all
- Filemaker ignores characters that are not numbers when calculating mod. Added a check for unallowed characters at the end.
- Experimented with DE-IBANS which "were too long with appended zeros", couldn't replicate any error. Please forward the IBAN in question.

Weakness: No checks for leading and trailing spaces, those may affect the IBAN. Use Trim or Supertrim in Auto-Enter.
Lutz Cleffmann   Lutz Cleffmann, Düsseldorf, Germany
Jan 23, 2015
Works fine with my database.
Just a tiny bug: If you enter just the number "1" in the field the function returns also "1" for a correct IBAN. All other numbers and characters are recognized correctly as false.
Christoph Kaufmann   Christoph Kaufmann,
Jan 23, 2015
Added check for a minimum of 6 characters. Thanks to Lutz Cleffmann.
Christoph Kaufmann   Christoph Kaufmann,
Jan 23, 2015
Chrystel wrote from Antibes:

> My company uses an old version of Filemaker is 5.5 pro FM.

This .fp5 solution uses a file and a script to check any IBAN:
Claudius von Wrochem   Claudius von Wrochem, berlin
Mar 5, 2018
z instead of p

IBAN = Filter ( IBAN ; "1234567890abcdefghijklmnopqrstuvwxy !!! p !!! ABCDEFGHIJKLMNOPQRSTUVWXYZ " ) // IBAN enthält keine Schweinereien; Leerschläge bleiben erlaubt.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: