ToolBark
Developer

Credit Card Validator

Validate any card number with Luhn check and brand detection

Spaces and dashes are ignored. Validation is format-only — no real card data is sent anywhere.

Load a test number

Valid card number

Passes Luhn check and has a recognised length for this brand.

Formatted Number

4532 0151 1283 0366

Detected Brand

Visa

Valid lengths: 13, 16, 19 digits

Digit Count

16

Correct length for this brand

Checks

Luhn checksumValid lengthKnown brand
Show Luhn algorithm steps
Position (R→L)DigitActionValue
16keep6
26×2 = 12 − 9 = 33
33keep3
40×2 = 00
53keep3
68×2 = 16 − 9 = 77
72keep2
81×2 = 22
91keep1
105×2 = 10 − 9 = 11
111keep1
120×2 = 00
132keep2
143×2 = 66
155keep5
164×2 = 88
Sum50 (mod 10 = 0) → ✓ valid
About

The Credit Card Validator uses the Luhn algorithm to instantly verify whether a card number is structurally valid and detects the card brand by prefix — Visa, Mastercard, Amex, Discover, Diners Club, or JCB. Ideal for developers testing checkout flows and payment integrations, it runs entirely in the browser with no data transmitted anywhere.

FAQ
What is the Luhn algorithm?+

The Luhn algorithm (also called Modulus 10) is a simple checksum formula used to validate card numbers. Starting from the rightmost digit, every second digit is doubled; if doubling produces a number greater than 9, subtract 9. If the total sum of all digits is divisible by 10, the number is valid.

Does this tool validate real credit cards?+

No. It only checks that the number is mathematically valid (correct format and Luhn checksum). It cannot verify whether a card account actually exists, has funds, or is active. Use it for testing payment forms with synthetic test numbers only.

How does card brand detection work?+

Card brands are identified by their IIN (Issuer Identification Number) — the first several digits of the card number. For example, Visa numbers always start with 4, Amex with 34 or 37, and Mastercard with 51–55 or the 2221–2720 range.

Where can I get safe test card numbers?+

Card networks publish official test numbers. Visa typically uses 4111 1111 1111 1111, Mastercard uses 5500 0000 0000 0004, and Amex uses 3714 496353 98431. The sample buttons in this tool load well-known passing test numbers for each brand.

Related tools