Paying.co arrow_back Back to Paying.co Talk to us arrow_forward
verified Validator

Luhn / PAN Validator

Check a Primary Account Number against the Luhn mod-10 checksum, identify the issuing network from the IIN, and compute the correct check digit for a partial number.

Card number (PAN)spaces and dashes are ignored
verified
Validation result will appear here
Check-digit generatorenter a PAN without its final digit

How the Luhn checksum works

The Luhn algorithm is a simple checksum used across payment cards, IMEI numbers, and other identifiers. Reading right to left, every second digit is doubled; any doubled value over nine has nine subtracted. All resulting digits are added together, and a number is valid when that total is a multiple of ten. It catches every single-digit error and most adjacent transpositions.

What network detection uses

The leading digits of a PAN — the Issuer Identification Number, historically called the BIN — map to a card network. This tool recognises the major ranges by prefix and length. It does not perform a live BIN lookup against an issuer database, so it identifies the network, not the specific bank.

Frequently asked questions

Is the card number sent anywhere?

No. Validation, detection, and generation all run in your browser. Nothing is transmitted or stored.

Does a valid Luhn mean the card works?

No. Luhn only proves the number is well-formed. It says nothing about whether the account exists or can be charged.

Building card-present or card-not-present flows?

We engineer and certify payment apps end to end. See custom development →

lock Everything runs in your browser. No card number is ever transmitted to a server. Use test card numbers where possible.