Luhn Algorithm Checker – Validate Card Numbers and IMEIs with Mod 10
Luhn Algorithm Checker
Use this free Luhn algorithm checker to verify credit card numbers, IMEI numbers and ID numbers with the Mod-10 check, safely in your browser.

Quick answer
To use this Luhn algorithm checker, type or paste a credit card number, IMEI or other ID into the box and press Check Luhn Validity. The tool doubles every second digit from the right, adds all the digits and checks whether the total is a multiple of 10. It shows Valid or Invalid, the total sum, a digit-by-digit breakdown and a guess of the card network or IMEI. Nothing leaves your browser.
The Luhn algorithm, also called the Mod 10 check, is a simple checksum built into credit card numbers, IMEI numbers on phones and many national ID schemes. It catches the most common typing errors, such as one wrong digit or two digits swapped. This free Luhn algorithm checker runs that check instantly and shows exactly how the result was calculated.
I improved the label next to the result so 15-digit IMEI numbers are recognised as IMEIs instead of being mistaken for card numbers. The digit breakdown makes the tool handy for developers testing payment forms and for students learning how checksums work.
Luhn Algorithm Checker Features
| Feature | How it works |
|---|---|
| Mod 10 validation | Standard Luhn check used by payment cards and IMEIs |
| Digit-by-digit breakdown | Shows which digits were doubled and the running total |
| Total sum shown | Displays the final sum and whether it is a multiple of 10 |
| Card network guess | Recognises Visa, Mastercard, American Express, Discover, Diners Club and JCB prefixes |
| IMEI recognition | Labels 15-digit non-Amex numbers as IMEIs |
| Flexible input | Accepts spaces and dashes, with a live digit counter |
| Clear button | Reset in one click to test another number |
| Private | Runs locally; numbers are never sent or stored |
How to Use the Luhn Algorithm Checker
Step 1: Enter the card number, IMEI or ID
Type or paste the number into Enter Number to Verify. Spaces and dashes are fine, and the counter shows how many digits you entered. You can find a phone's IMEI by dialling *#06#.

Step 2: Press Check Luhn Validity
Press Check Luhn Validity. Starting from the rightmost digit, the tool doubles every second digit, subtracts 9 from any result above 9 and adds everything together.

Step 3: See the result and the digit-by-digit breakdown
A Valid Luhn Number result means the total is a multiple of 10. The breakdown grid shows each digit and its doubled value, and the label shows the likely card network or IMEI. An Invalid result usually means a typo.

How the Luhn Algorithm Works
Take the number and, starting from the rightmost digit, double every second digit. If doubling gives a two-digit number, subtract 9 (or add its two digits together). Add up all the digits, both doubled and untouched. If the total ends in 0, the number passes. For example, 79927398713 adds up to 70, so it is valid. The last digit of a card number or IMEI is chosen specifically to make this total work out.
Where the Luhn Check Is Used
- Payment cards: Visa, Mastercard, American Express, Discover and most other card numbers.
- IMEI numbers: the 15-digit identifier of every mobile phone.
- National IDs: some ID schemes, such as Canadian Social Insurance Numbers, use Luhn.
- Gift cards and loyalty numbers: many retailers add a Luhn check digit.
- Software testing: developers use it to validate form input before calling a payment API.
What a Luhn Check Does Not Prove
Passing the Luhn algorithm checker only means the number is well formed. It does not mean a card is real, active or has funds, and it does not confirm that an IMEI belongs to a working phone. For testing payment forms, use the official test numbers published by your payment provider rather than real card numbers.
Frequently Asked Questions
Is this Luhn algorithm checker free?
Yes. It is free with no sign-up and no limits.
Is it safe to enter a card number?
The check runs entirely in your browser, and numbers are never sent or saved. Even so, for testing it is best to use published test numbers rather than a real card.
What is the Luhn algorithm used for?
It is a checksum that catches typing errors in credit card numbers, IMEI numbers and some ID numbers.
Does a valid result mean the card is real?
No. It only confirms the number is correctly formed. Only the card issuer can confirm that a card exists and is active.
How do I check my phone's IMEI?
Dial *#06# on the phone to show the IMEI, then enter the 15-digit number here.
Can the Luhn check catch every mistake?
It catches any single wrong digit and most swaps of two neighbouring digits, but not every possible error, such as swapping 09 and 90.