A credit card validator checks whether a card number passes the Luhn algorithm (mod 10 check digit), detects the card network by prefix, and verifies the number length is valid for that network. Used by developers to test payment forms, validate test data, and verify card number generation logic.

FOR TESTING ONLY. Never enter a real credit card number. This tool validates format only — it cannot be used to process payments. All validation runs locally in your browser.

Generate Test Numbers

Create Luhn-valid test numbers for each card network. These are NOT real card numbers.

Card Network Prefix Reference

Network Prefix(es) Length(s)
Visa413, 16, 19
Mastercard51–55, 2221–272016
Amex34, 3715
Discover6011, 622126–622925, 644–649, 6516, 19
Diners Club300–305, 36, 3814
JCB3528–358916