Developer Tools

Credit Card Validator


Check a card number against the Luhn checksum, detect the brand, and confirm the length — a format check that runs entirely in your browser and contacts no bank.

Try a test number:

This checks the number format only — it does not contact any bank. Use test numbers; never type a real card you don't own.

💡 About card validation

  • Private: the number is checked in your browser and never sent anywhere.
  • Luhn algorithm is a checksum that catches most single-digit typos.
  • Format only: a valid checksum does not mean the card is real or active.

The Credit Card Validator checks whether a card number is well-formed, right in your browser.

It runs the Luhn checksum, detects the brand, and confirms the length. Nothing is ever sent to a server.

How to validate a card number

  1. Type the number. Spaces and dashes are fine.
  2. Read the verdict. A green tick means it passes the format and checksum.
  3. Check the details. Brand, Luhn result, and digit count are shown separately.

What validation can and cannot tell you

A valid number is one that is shaped correctly and passes the Luhn checksum, which reliably catches typos. It is exactly the check a website runs before sending a payment for authorisation.

It cannot tell you whether the card exists, is active, or has money — only the bank knows that. Treat this as a formatting and typo check.

  • Private: the number stays in your browser, never uploaded.
  • Luhn checksum: catches most mistyped digits.
  • Brand detection: Visa, Mastercard, Amex, and more.
  • Safe testing: made for published test numbers.

Related developer tools

This is a handy check when building a checkout form. To test other patterns in your input fields, the Regex Tester lets you try validation expressions live.

When you need placeholder identifiers for test records, the UUID Generator produces unique IDs. And for secure test credentials, the Strong Password Generator builds strong passwords from the same crypto source.

Frequently Asked Questions

Is my card number sent anywhere?

No. The number is checked in your browser and is never uploaded, stored, or sent to any bank. Even so, use published test numbers rather than a real card.

What does the Luhn check prove?

The Luhn algorithm is a checksum that most card numbers satisfy, so it catches the majority of single-digit typos. Passing it does not mean the card is real, active, or has funds.

Which card brands are detected?

It recognises Visa, Mastercard, American Express, Discover, Diners Club, JCB, and UnionPay from the number's leading digits and length.

Can it tell me if a card is real?

No. Only the card issuer can confirm that a number belongs to a real, active account. This tool checks the format and checksum, nothing more.

What are test card numbers?

Payment providers publish fake numbers, such as 4242 4242 4242 4242, that pass the Luhn check for use in development. They are ideal for trying this tool safely.