Credit Card Validator

Check a credit card number with the Luhn algorithm, detect the card type and validate expiry and CVV.

Checked offline in your browser with the Luhn algorithm — nothing is sent anywhere.

Type or paste a card number — the result updates as you type.

Test numbers:

This tool checks the structure of a number only. It cannot tell you whether a card really exists, is active, or has funds — only the issuing bank can.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Every credit and debit card number carries a built-in checksum. The last digit is a check digit produced by the Luhn algorithm (ISO/IEC 7812): double every second digit from the right, subtract 9 from anything over 9, add everything up, and a genuine number is always divisible by 10. This validator runs that maths as you type, so a single mistyped or transposed digit is caught immediately.

The first digits — the IIN or BIN — identify the card scheme, so the tool also names the network (Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay or Maestro) and confirms the number has a length that scheme actually issues. Optional expiry and security-code fields check the date is still in the future and that the CVV has the right number of digits (4 for Amex, 3 for everyone else). All of it runs in JavaScript on your device: no card number is uploaded, logged or stored, and the page makes no network requests at all.

Frequently asked questions

How do I check if a credit card number is valid?

Paste the number into the box and the result updates as you type. The validator runs the Luhn checksum on the digits, matches the leading digits (the IIN/BIN) against the known card schemes, and confirms the length is one that scheme actually issues. You get a pass or fail for each check, plus optional expiry-date and security-code validation.

What is the Luhn algorithm?

The Luhn algorithm is the checksum built into every card number under ISO/IEC 7812. Starting from the right, every second digit is doubled (subtracting 9 from any result above 9), all digits are summed, and a valid number gives a total divisible by 10. It is designed to catch single mistyped digits and most transposed pairs, which is why it is the standard front-end check before a payment is sent.

Is it safe to type a real card number into this validator?

Yes. Everything runs in JavaScript inside your browser: the page makes no network requests, so the number is never uploaded, logged or stored, and it works offline. Bear in mind that a Luhn pass only means the number is structurally correct — it cannot tell you whether the card exists, is active or has funds. Only the issuing bank can confirm that.

Report a bug