Skip to content
ToolMug

Credit Card Number Validator

Enter a credit or debit card number to check its format and Luhn checksum. The calculation runs only in your browser and can catch common typing errors, but cannot confirm that an account exists.

Runs in your browser — nothing you enter is uploaded

Spaces and hyphens are allowed. Validation happens locally in your browser.

Luhn checksum valid

Digits
4111 1111 1111 1111
Number of digits
16
A valid checksum only catches common typing errors. It does not prove that a card exists or is active. Never enter a PIN, CVV or one-time code.

How to use

  1. Enter the card number with or without spaces or hyphens; never enter the PIN, CVV or a one-time code.
  2. Check whether the length and Luhn checksum are valid.
  3. If the checksum is wrong, compare the expected final check digit with the number you typed.

Options explained

Length
Payment card numbers usually contain 12–19 digits. Length alone does not identify a bank or prove that a number was issued.
Luhn checksum
Starting from the right, alternating digits are doubled and reduced, then all digits are summed. A valid total is divisible by 10.
Check digit
The final digit is chosen so the whole number passes Luhn. The calculator can show which final digit would make the typed prefix valid.

Safe test numbers

4111 1111 1111 1111 and 5555 5555 5555 4444 are widely published test numbers that pass Luhn but are not usable payment accounts.

The Luhn algorithm detects every single-digit error and most adjacent digit transpositions. It is an error check, not encryption, authorization or fraud detection.

Frequently asked questions

Does a valid result mean the card is real?

No. Luhn only checks the number's internal arithmetic. It cannot tell whether the account was issued, is active or has funds.

Is my card number uploaded?

No. Validation runs locally in your browser. Even so, use a published test number when you only need to test the algorithm.

Do all payment cards use Luhn?

Most major credit and debit card schemes do, but a number can have a different format or use another check system.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools