Credit Card Validator

Validate credit card numbers with Luhn algorithm, detect card issuer, and check card length and format.

Card Validator

Enter a credit card number to validate. Spaces and dashes are automatically removed.

How to Use

  1. Enter a card number — Type or paste a credit card number in the input field. Spaces and dashes are handled automatically.
  2. Instant validation — The card is validated in real-time using the Luhn algorithm. Valid/invalid status updates as you type.
  3. View card details — See the card issuer (Visa, Mastercard, American Express, Discover, etc.), card number length, and IIN/BIN prefix.
  4. Try examples — Click the Example button to test with valid and invalid sample card numbers.

All validation is performed 100% client-side in your browser. No card data is sent to any server.

What Is the Luhn Algorithm?

The Luhn algorithm (also known as Luhn formula or modulus 10 algorithm) is a simple checksum formula used to validate a variety of identification numbers, most notably credit card numbers. It was created by IBM scientist Hans Peter Luhn and is now in the public domain.

Starting from the rightmost digit (excluding the check digit), every second digit is doubled. If doubling results in a number greater than 9, the digits are added together (or the product minus 9). The sum of all digits must be divisible by 10 for the number to be valid.

This algorithm can detect single-digit errors and most adjacent digit transpositions, but it is not a cryptographic hash and should not be used for security purposes.

Credit Card Issuer Prefixes

Issuer Prefix Length
Visa413, 16, 19
Mastercard51-55, 2221-272016
American Express34, 3715
Discover6011, 622126-622925, 644-649, 6516-19
Diners Club300-305, 36, 38, 3914-19
JCB3528-358916-19
Maestro50, 56-6912-19
UnionPay6216-19
Verve506099-506198, 650002-65002716-19

Frequently Asked Questions

Is my credit card data sent to a server?

No. All validation happens entirely in your browser using JavaScript. No card data is transmitted over the network or stored anywhere.

What is the Luhn algorithm?

The Luhn algorithm (modulus 10) is a simple checksum formula used to validate credit card numbers. It verifies that the number is mathematically valid, but does not confirm that the card actually exists or has available funds.

Does a valid Luhn check mean the card is real?

No. A valid Luhn check only means the number is mathematically valid. It does not mean the card is issued, active, or has available balance. For actual card verification, you need a payment processor.

What card issuers are supported?

The tool detects Visa, Mastercard, American Express, Discover, Diners Club, JCB, Maestro, UnionPay, and Verve based on the IIN/BIN prefix of the card number.

Related Tools