Credit Card Validator (Luhn)

Check whether a card number passes the Luhn checksum — and see its likely brand — right in your browser. It catches typos, not whether the card is real.

Security Tools Free No upload Instant

Loading Credit Card Validator (Luhn)…

Your browser is preparing the tool. It runs 100% locally.

Quick Answer

Enter a card number and the tool runs the Luhn checksum — the mod-10 test that every real card number satisfies — and tells you whether it passes, plus the likely brand (Visa, Mastercard, Amex, Discover) from its opening digits. A pass means the number is well-formed, catching typos and transpositions; it does not mean the card is real, active or has funds. It runs entirely in your browser, so the number is never sent anywhere.

What the Credit Card Validator (Luhn) Does

This tool applies the Luhn algorithm to a card number and reports whether it passes, alongside a best guess at the card brand based on the leading digits. Spaces and dashes are ignored, so you can paste a number in its usual grouped form.

It is the quick way to sanity-check a card number — to catch a mistyped or misheard digit before submitting a form — using the same mathematical test that payment systems use as a first filter.

How It Works

The Luhn check works from right to left. Starting with the second-to-last digit, every other digit is doubled; if doubling gives a two-digit result, 9 is subtracted. All the digits are then added together, and the number passes if that total is a multiple of 10. This catches any single wrong digit and most cases where two adjacent digits are swapped.

The brand guess comes from the opening digits, which follow industry ranges: numbers starting with 4 are Visa, 51 to 55 are Mastercard, 34 or 37 are American Express, and 6 is Discover. This is a rough identification from the prefix, not a lookup of the issuing bank.

What it checks & how

  1. Strip to digits. Remove spaces, dashes and any non-digit characters from the number.
  2. Apply the Luhn doubling. From the right, double every second digit and subtract 9 from any result over 9.
  3. Sum and test mod 10. Add all the digits; the number passes if the total is a multiple of 10.
  4. Guess the brand. Read the opening digits to identify the likely card network.

Luhn (mod 10) check

from the right, double every 2nd digit (if over 9, subtract 9) add all the digits together valid if the total mod 10 = 0
Worked example
4111 1111 1111 1111 → passes Luhn · Visa · change one digit (…1121) → fails

A pass means the number is well-formed. The Luhn check detects all single-digit errors and most swaps of adjacent digits — but anyone can construct a number that passes, so it proves form, not legitimacy.

Privacy

Your card number never leaves your device. The check runs entirely in your browser with no network request, so nothing is uploaded.

As a rule, never enter a real card number into a website you do not trust. This tool is built so the number stays local, but the safe habit is to test with the first digits or a known sample where possible.

Nothing persists between sessions — close the tab and the number is gone.

Standards & references

  • Luhn algorithm (ISO/IEC 7812-1) — The mod-10 checksum used to validate card and other identification numbers. Devised by Hans Peter Luhn at IBM, it is an error-detection formula, not a security or anti-fraud measure.
  • What it detects — The Luhn check catches all single-digit errors and most transpositions of adjacent digits — the common mistakes when typing a number. It does not detect a deliberately fabricated number.
  • Issuer prefixes — Card brands occupy known opening-digit ranges (Visa 4, Mastercard 51 to 55, Amex 34 and 37, Discover 6). The brand shown is inferred from these prefixes, not from the issuing bank.

Accuracy & Limitations

The Luhn test is exact and standard, so a number that passes here passes everywhere, and the tool reliably flags the typing mistakes the algorithm is designed to catch.

A passing number is only well-formed, not real. The Luhn check cannot tell you whether a card exists, is active, has funds, or has been reported stolen — anyone can generate a number that passes, which is why payment systems use it only as a first filter before contacting the bank.

The brand detection is a prefix guess and not exhaustive. It covers the major networks by their common ranges but may show Unknown for valid cards from other schemes, and it does not verify the issuer.

It checks the checksum, not the length rules of each network. Some numbers of the wrong length could still pass the Luhn test, so a pass is necessary but not sufficient for a number to be a genuine card.

Real-World Use Cases

Catching a typo

Confirm a card number was entered without a wrong or swapped digit.

Form validation

Run a client-side Luhn check before submitting a payment form.

Identifying the brand

See the likely card network from the opening digits.

Learning the algorithm

Watch how the Luhn checksum responds to a changed digit.

When to use it — and when not to

Good for

  • Catching a mistyped card number
  • Client-side payment form validation
  • Guessing the card brand from a prefix
  • Learning how the Luhn check works

Not the best choice for

  • Confirming a card is real or active
  • Checking a balance or chargeability
  • Detecting a stolen or fabricated card
  • Any anti-fraud or authorisation decision

To know whether a card can actually be charged, a real authorisation through a payment processor is the only answer — the Luhn check is just the first, offline filter. Never use it as proof a card is legitimate.

Frequently Asked Questions

What does a Luhn pass actually mean?
It means the number is well-formed — it satisfies the mod-10 checksum that every real card number follows. It catches typing mistakes, but it does not prove the card exists, is active or has funds.
Does this tell me if a card is real?
No. The Luhn check only verifies the number's mathematical pattern. Anyone can build a number that passes, so a pass is not evidence the card is genuine. Only a payment processor can confirm a card can be charged.
What errors does the Luhn algorithm catch?
All single-digit errors and most transpositions of two adjacent digits — exactly the mistakes people make when typing or reading out a card number. That is what it was designed for.
How is the card brand identified?
From the opening digits: 4 is Visa, 51 to 55 is Mastercard, 34 and 37 are American Express, and 6 is Discover. It is a prefix guess, not a lookup of the issuing bank, so some cards may show Unknown.
Is it safe to enter my real card number?
This tool runs entirely in your browser and uploads nothing, so the number stays on your device. As a general habit, though, avoid entering real card numbers into websites unless you trust them.
Why does a made-up number sometimes pass?
Because the Luhn check only tests the checksum pattern. It is easy to construct digits that add up correctly, so passing means well-formed, not real. That is by design — it is an error detector, not a fraud detector.
Does the Luhn check work on other numbers?
Yes. The same mod-10 algorithm validates IMEI numbers on phones, some national IDs and other identifiers. Credit cards are the most familiar use, but it is a general checksum.
Do spaces and dashes matter?
No. The tool strips spaces, dashes and other non-digits before checking, so you can paste a number in its usual grouped form.
What is the difference between Luhn and a CVV check?
They are unrelated. Luhn validates the card number's format; the CVV is a separate security code checked by the payment processor during a transaction. This tool only does the Luhn number check.
Will it tell me the issuing bank?
No. It infers only the broad brand from the prefix. Identifying the exact issuer needs a bank identification number (BIN) database, which this tool does not use.
Is a longer card number more valid?
Length depends on the network — many cards are 16 digits, Amex is 15. The tool checks the Luhn checksum rather than enforcing each network's exact length, so a pass does not by itself confirm the length is right.
Is anything stored or logged?
No. The check is computed locally and nothing persists once you close the tab, so the number is not saved or sent anywhere.

References

Runs the standard Luhn mod-10 checksum and guesses the brand from the prefix; honest that a passing number is only well-formed, not necessarily real, active or funded.

PopularHot

Password Generator

Password Generator computed locally with Web Crypto — your secrets never leave the page.

SecurityOpen Tool
Popular

Password Strength Checker

Use Password Strength Checker for stronger security hygiene — private, instant and free.

SecurityOpen Tool
Popular

Random Number Generator

Random Number Generator computed locally with Web Crypto — your secrets never leave the page.

SecurityOpen Tool
Trending

SHA-256 Hash Generator

SHA-256 Hash Generator computed locally with Web Crypto — your secrets never leave the page.

SecurityOpen Tool
Trending

Passphrase Generator

Passphrase Generator computed locally with Web Crypto — your secrets never leave the page.

SecurityOpen Tool

MD5 Hash Generator

Use MD5 Hash Generator for stronger security hygiene — private, instant and free.

SecurityOpen Tool

Ready to try the Credit Card Validator (Luhn)?

It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.