Credit Card Validator & Generator
Validate card numbers with the Luhn algorithm and generate test numbers.
About the Credit Card Validator & Generator
Validate a card number with the Luhn algorithm (mod 10), identify the brand from the prefix, and generate syntactically valid fake numbers for testing forms and payment flows. Generated numbers pass the checksum but are not real accounts and will not work with any payment processor.
Frequently asked questions
What is the Luhn algorithm?
A mod-10 checksum: every second digit from the right is doubled, digits over 9 are summed, and the total must be divisible by 10.
Are the generated numbers real?
No. They only satisfy the checksum pattern for testing UIs and validation logic; they are not connected to any account.
Which brands are supported?
Visa, Mastercard, American Express, Discover, JCB, Diners Club, and UnionPay prefixes.