Skip to main content

Credit Card Validator

New

Validate a card number's Luhn checksum, detect its network (Visa, Mastercard, Amex, etc.), and generate fake test numbers for sandbox use.

credit cardluhnvalidatorpaymentstesting
Read the guide
Shortcuts:⌘ KSearch

All checks run locally in your browser. This tool validates checksum format only — it cannot tell you whether a card is active, funded, or real.

Enter a card number to validate.
Checksum
Luhn check—
Digit count—
Normalized—
Network detection
Network—
Expected length—
IIN / BIN prefix—
Test numbers (clearly fake, for QA/sandbox use only)
Continue with:

Frequently Asked Questions

Does this tool check whether a card is real or has funds?

No. It only verifies the Luhn checksum and the number's format/length against known network prefixes — the same math a payment form runs before ever contacting a card network. It cannot and does not check if a card exists, is active, or is authorized.

How does the Luhn algorithm actually work?

Starting from the rightmost digit, every second digit is doubled; if doubling produces a two-digit number, its digits are added together. All digits are then summed, and the number is valid if that sum is a multiple of 10.

Is it safe to paste a real card number into this tool?

The check runs entirely in your browser via JavaScript — nothing is sent to a server or logged. That said, we recommend using the built-in example/test numbers for anything other than verifying your own card entry logic.

What do the generated "test numbers" actually generate?

A random 16-digit number starting with the well-known Visa test prefix "4", with a correct Luhn check digit computed and appended. These are for exercising form validation and sandbox payment APIs only — they are not tied to any real account and will be rejected by any real payment processor.

Why does it say a valid-Luhn number could still be "not a real network"?

Luhn validity only proves the digits are internally consistent — the network detection is a separate step based on publicly documented BIN (bank identification number) prefix ranges for Visa, Mastercard, Amex, Discover, Diners Club, JCB, and UnionPay.

Related Tools