Skip to content

How to Use Credit Card Validator

Check whether a card number is valid with the Luhn algorithm, detect the network (Visa, Mastercard, Amex and more) and verify the length, privately.

About this tool

Check whether a card number is valid with the Luhn algorithm and identify the card network.

How to use Credit Card Validator

  1. Type or paste a card number. Spaces and dashes are ignored.
  2. Read whether it passes the Luhn checksum and has the right length for its network.
  3. Use it to catch typos in test numbers or forms; it does not check whether a card is real or active.

Worked example

The test number 4111 1111 1111 1111 is a valid Visa number. Swapping two digits makes the Luhn check fail, which is exactly the kind of typo checkout forms catch.

What is the Luhn algorithm?

A checksum formula built into card numbers that detects most single-digit mistakes and swapped digits.

Is the number sent to a server?

No. Validation runs in your browser. Still, never enter a real card number on sites you do not trust.

Put this guide into practice

  • Credit Card Validator — Check whether a card number is valid with the Luhn algorithm and identify the card network.

Explore Security & Encoding Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help