Fork me on GitHub


The numchk tool is a command-line tool that identifies self-consistent numbers and checks their correctness. In short, it is like file(1) for numbers with check digits.

The focus is on fast bulk processing of identifiers arising primarily in the financial sector. The design, inspired by libarchive, allows for easy extension.

Red tape

  • no external dependencies
  • licensed under BSD3c


Supported checks

As of version 0.1 the following numbers can be identified and checked:

  • FIGIs (formerly known as Bloomberg Global Identifiers)
  • ISINs (according to ISO 6166:2013)
  • IBANs (according to ISO 13616-1:2007)
  • CUSIPs
  • SEDOLs
  • credit card account numbers
  • GTINs
  • ISBNs


numchk comes with a no-frills UI that does what you’d expect:

$ numchk JP3946600008
JP3946600008	ISIN, conformant with ISO 6166:2013
$ numchk BBG000XDNRC6 BBG005D215R6
BBG000XDNRC6	FIGI, conformant with
BBG005D215R6	FIGI, not conformant, should be BBG005D215R7

Input from stdin is of course allowed:

$ numchk <<EOF
3566 0020 2036 0505
378282246310005	American Express, conformant account number
3566 0020 2036 0505	JCB, conformant account number
5901234123457	GTIN, conformant
978-3-16-148410-0	ISBN, conformant with ISO 2108:2005

Further Reading