Luhn Checker & Check Digit Calculator

Validate a card, IMEI or account number with the Luhn mod-10 checksum, compute a missing check digit, and identify the card network from its prefix.

✓ Valid — passes the Luhn checksum

16 digits: 4242 4242 4242 4242

Luhn sum: 80 (80 mod 10 = 0)

Card network: Visa

Issuer prefix (IIN/BIN, first 6 digits): 424242

Security code: CVV2, 3 digits

Test card numbers — pick one to check it:

10 digits

Check digit:3
Complete number:79927398713

What is the Luhn algorithm?

The Luhn algorithm (also called the mod 10 checksum) is a simple formula used to catch accidental typos in identifier numbers such as credit card numbers, IMEI device serials and some national ID numbers. Starting from the rightmost digit, you double every second digit, subtract 9 from any result over 9, add everything up, and check whether the total is divisible by 10. If it is, the number passes the checksum.

Validating and generating check digits

Paste a full number to see instantly whether it is valid. Spaces and dashes are ignored, so formats like 4242 4242 4242 4242 work fine. Under the field, the digits are counted and shown grouped the way a card prints them, so a long number is easy to read back against the card while what you typed stays exactly as you typed it. To build a valid number, enter the digits without the final check digit and this tool computes the single digit you should append. For a full number it also identifies the card network — Visa, Mastercard, American Express, Discover and others — from the opening digits, so a card-shaped number that fails the checksum reads as a likely typo. To check many numbers at once, paste them into the list box at the bottom, one per line, or open a text file: each line comes back ✓ or ✗ with its card network, a count says how many are valid, and Copy results or Download CSV takes the answers away. Remember: passing the Luhn check only means the number is well-formed, not that the card or account actually exists or is active.

What the Luhn check cannot catch

Luhn catches every single mistyped digit and almost every swap of two neighbouring digits. The exception is 09 written as 90, or 90 as 09, which leaves the sum unchanged. It also misses the twin errors 22 ↔ 55, 33 ↔ 66 and 44 ↔ 77, and it never notices two digits trading places across one between them — 123 read as 321 — because both sit in positions the formula treats alike. A number that passes is well-formed, not proven right.

Frequently asked questions

Does a valid Luhn checksum mean the card is real?

No. The Luhn check only verifies that the digits are internally consistent, which catches most typos. It cannot tell you whether a card exists, is active, or has funds.

What is a check digit?

The check digit is the final digit of many identifier numbers. It is derived from the other digits so that the whole number satisfies the Luhn formula, giving a quick way to detect single-digit errors.

Can it recover a digit I cannot read?

Yes. Type the number into "Number with unknown digits" with a * for each missing or unreadable digit — anywhere in the number, the check digit included, as many as the label allows — and it lists every filling that passes the Luhn check, with a count and a Copy button. One unknown digit always has exactly one answer; each extra unknown multiplies the candidates by ten.

Can I check a whole list of numbers at once?

Yes. Paste them into the list box at the bottom, one number per line, or fill it from a text file with the Open file… button. Each line comes back ✓ or ✗ with the number as written and its card network, a line that is not a number is marked as such, and a summary says how many were checked and how many are valid; lines past the limit the label states are counted rather than checked. Copy results takes the list as text, and Download CSV saves luhn-check.csv with the number, true or false, and the network for each line.

Can it check gift cards or IMEI numbers, or work out a card's CVV, expiry date or PIN?

It checks any number that uses the Luhn check digit — most payment cards, some gift and store cards, and a phone's 15-digit IMEI. A gift card that uses a scheme of its own simply fails, which says nothing about the card. The CVV, the expiry date and the PIN are not derived from the card number by any formula someone outside the bank can run: the CVV is computed with the issuer's secret key, the expiry date is set when the card is issued, and the PIN is chosen by the issuer or the holder. No tool can calculate them from the number, and one that claims to is guessing or fishing for card details.

Can it check an IBAN or an ISBN?

No — neither uses the Luhn check digit; each has a checksum of its own. This site has a tool for each, the IBAN validator and the ISBN validator, both linked under Related tools on this page.