Browser-only validator

Credit card number validator

Check a test card number’s network, expected length, and Luhn checksum without sending the value to a server.

Check a number

Enter test card digits

Never enter a real card number. Use a processor-provided sandbox number or one of the safe samples below.

Spaces and hyphens are ignored. The check runs locally in JavaScript.

How it works

Three checks, one clear result.

Network prefix

Recognizes common Visa, Mastercard, American Express, and Discover test-number prefixes.

Expected length

Compares the digit count with the common lengths used by the detected network.

Luhn checksum

Applies the public modulo-10 checksum used to catch many typing errors. It does not prove a card exists.