Docs / Identifier checks

Identifier checks

Most identifiers in everyday use end with a check digit or two: IBANs, ISBNs, EAN barcodes, payment card numbers, vehicle identification numbers, securities codes, legal entity identifiers, and national numbers such as the Russian INN. A check digit is computed from the other characters so that a typing error produces a number that does not add up. It is protection against mistakes, not against invention.

That distinction is where the errors in this area come from. A number that passes its check is well formed; it does not follow that a bank account, a book, a car or a company with that number exists. Anyone can compute a valid check digit for a made-up number, and test data generators do it all the time. Every answer in this group therefore says what was examined and what was not.

The algorithms differ more than their names suggest. Luhn, mod 97, mod 11 with an X, and weighted sums with country-specific weights each catch different kinds of error, and some identifiers change algorithm between versions, as ISBN did between its 10 and 13 digit forms. Spaces, hyphens and invisible characters are removed before checking and the normalised form is shown; any other stray character is refused with its name and position, never silently dropped.

No identifier is looked up in any registry, and none is stored. Card numbers are answered with no-store, private, and the request log keeps route patterns, never the values.

Pages on known traps

Every endpoint in this group

/check/iban/{value}

IBAN: country length and mod-97 check digits

value: the IBAN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/iban/DE89370400440532013000"

Validate an IBAN: Check an IBAN's length and mod-97 check digits for its country. A valid result means the IBAN is well formed, not that the account exists or can receive money.

/check/bic/{value}

BIC/SWIFT code structure (no check digit exists)

value: the BIC to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/bic/DEUTDEFF500"

/check/isbn/{value}

ISBN-10 or ISBN-13 check digit, with conversion

value: the ISBN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/isbn/978-0-306-40615-7"

/check/ean/{value}

EAN-8, UPC-A, EAN-13 or GTIN-14 check digit

value: the EAN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/ean/4006381333931"

/check/card/{value}

Payment card number: Luhn check and brand by range (not stored)

value: the CARD to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/card/4111111111111111"

/check/luhn/{value}

Generic Luhn (mod 10) check

value: the LUHN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/luhn/79927398713"

/check/imei/{value}

IMEI Luhn check digit (or compute it for 14 digits)

value: the IMEI to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/imei/490154203237518"

/check/vin/{value}

Vehicle identification number: characters and check digit

value: the VIN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/vin/1M8GDM9AXKP042788"

/check/vat/{value}

EU VAT number format by country (no registry lookup)

value: the VAT to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/vat/DE123456789"

/check/inn/{value}

Russian ИНН (INN) check digits, 10 or 12 digits

value: the INN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/inn/7707083893"

/check/snils/{value}

Russian СНИЛС (SNILS) check number

value: the SNILS to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/snils/112-233-445%2095"

/check/ogrn/{value}

Russian ОГРН / ОГРНИП check digit

value: the OGRN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/ogrn/1027700132195"

/check/kpp/{value}

Russian КПП (KPP) structure

value: the KPP to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/kpp/773601001"

/check/uuid/{value}

UUID layout, version, variant and embedded timestamp

value: the UUID to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/uuid/01890a5d-ac96-774b-bcce-b302099a8057"

/check/isin/{value}

ISIN check digit (Luhn over expanded letters)

value: the ISIN to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/isin/US0378331005"

/check/lei/{value}

Legal Entity Identifier mod-97 check digits

value: the LEI to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/lei/5493001KJTIIGC8Y1R12"

/check/mac/{value}

MAC address format, unicast/multicast and local/universal bits

value: the MAC to check; spaces, hyphens and invisible characters are ignored

curl "https://agent-helper.org/check/mac/00:1A:2B:3C:4D:5E"

/check/phone/{value}?[region=]

Telephone number against the numbering plan: validity, type, E.164

value: number, ideally international (+CC...); '+' may be written literally in the path; region (optional): ISO 3166 alpha-2 country for numbers written without +CC

curl "https://agent-helper.org/check/phone/+14155552671"