4242 4242 4242 4242
Masked: **** **** **** 4242
- Brand
- Visa
- Length
- 16 digits
- Luhn checksum
- Passes
Expected length for Visa: 13, 16, 19 digits. Security code (CVV/CVC): 3 digits.
Developer Tools
Validate card numbers with the Luhn algorithm, detect Visa, Mastercard, Amex, and more, and generate sandbox test numbers. Browser-only, no signup.
Use this tool with test card numbers, not real ones. Numbers you type are validated entirely in your browser and never sent to a server, but you should still avoid pasting live card details into any web form.
4242 4242 4242 4242
Masked: **** **** **** 4242
Expected length for Visa: 13, 16, 19 digits. Security code (CVV/CVC): 3 digits.
Luhn algorithm breakdown
Walk the digits from right to left. Double every second digit. If a doubled value is greater than 9, subtract 9. Sum every contribution. A valid card number sums to a multiple of 10.
Sum: 80 divisible by 10, checksum passes
Generate test card number
Public sandbox numbers from payment processor docs. They pass Luhn and have valid brand prefixes, but cannot be charged on a real network. Pick a brand to load it into the input.
Supported brands and length rules
Length: 15 digits. Security code: 4 digits.
Prefixes: 34, 37
Length: 13, 16, 19 digits. Security code: 3 digits.
Prefixes: 4
Length: 16 digits. Security code: 3 digits.
Prefixes: 51-55, 2221-2720
Length: 16, 19 digits. Security code: 3 digits.
Prefixes: 6011, 65, 644-649, 622126-622925
Length: 16, 17, 18, 19 digits. Security code: 3 digits.
Prefixes: 3528-3589
Length: 14, 16, 19 digits. Security code: 3 digits.
Prefixes: 36, 38, 39, 300, 301, 302, 303, 304, 305, 3095
Length: 16, 17, 18, 19 digits. Security code: 3 digits.
Prefixes: 62-62, 81-81
Length: 12, 13, 14, 15, 16, 17, 18, 19 digits. Security code: 3 digits.
Prefixes: 50, 56, 57, 58, 6
Credit Card Validator checks payment card numbers (PAN) entirely in your browser using the Luhn algorithm defined in ISO/IEC 7812. Paste or type a number and the tool strips non-digits, identifies the issuing brand from its IIN/BIN prefix (Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay, Maestro), checks the digit length against that brand's published rules, and runs the Luhn checksum. The result panel shows the detected brand, the expected length and CVV size, and a step-by-step Luhn breakdown with each digit, whether it was doubled, and the running sum, so the math is easy to verify and the tool doubles as a teaching aid for the algorithm. A separate batch mode accepts one number per line, validates the entire list at once, shows valid and invalid counts, marks each row, and exposes a single click to copy the valid-only list back to the clipboard, which is useful for cleaning fixture data and exported test sets. The tool also includes a generator for the publicly documented test card numbers used in sandbox environments by the major payment processors. These numbers pass Luhn and have valid brand prefixes, so they exercise checkout validation cleanly, but they cannot be charged on any real network. Brand detection prioritizes the longest matching prefix, so a four-digit Mastercard 2-series BIN beats the single-digit Visa 4 prefix correctly. Useful for QA of checkout forms, fixture generation, mocking payment data in tests, debugging form validation, learning how the Luhn algorithm works, and quickly recognizing the issuing network for an unknown number. Validation runs locally on your device, so any number you paste here never leaves your browser. Avoid pasting real customer card data into any web form, including this one; use the test number generator instead.
Free to use. Works in your browser. No signup, no login.
Related tools
Validate, deduplicate, and clean lists of email addresses with typo suggestions.
Open tool
DeveloperLive regex testing with highlights, capture groups, and replacement preview.
Open tool
SecurityLive strength meter with entropy, crack times, and common-password detection.
Open tool
GeneratorRandom integers, decimals, dice rolls, and list picks with unique-only and sort.
Open tool