HOW-TO

How to validate a credit card number

Validate a card number’s format and checksum with the Luhn algorithm before charging it. Free checker plus what Luhn does and does not prove.

You can catch most mistyped card numbers instantly with the Luhn checksum, before ever contacting a payment processor. Here is how to validate the format — and what it does not tell you.

Luhn catches typos, not fraud

The Luhn check confirms the digits are internally consistent, catching single-digit typos and most transpositions. It does not verify the card exists, is active, or has funds — only the issuing network can do that. Use Luhn for instant client-side feedback, then let the processor do real authorization.

Never store raw card data

Validating format is fine, but do not store full card numbers yourself — that pulls you into PCI-DSS scope. Use a payment provider’s tokenization so raw numbers never touch your servers.

Step by step

1

Enter the card number into the Luhn validator.

2

Confirm it passes the checksum (catches typos before submission).

3

Send valid-format numbers to your payment processor for real authorization.

4

Never store raw card numbers — rely on your provider’s tokenization.

Try it now — free, no signup

Use the Luhn validator in your browser. Then, when you need it at scale with an API key and higher limits, grab the full Eveses API.

FAQ

Does the Luhn check mean the card is real?›
No — only that the digits are consistent. It catches typos, not whether the card exists or has funds.
Is it safe to check a card number here?›
The Luhn check is a pure format test. Never enter real, active card numbers into any third-party tool, and never store raw card data yourself.

Related