Test Credit Card Number Generator

Luhn-valid fake card numbers for sandbox & form testing.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Test credit card number generator

This tool produces fake, Luhn-valid card numbers for developers and QA engineers who need to exercise payment forms, validation logic, and sandbox checkouts without touching real card data. Pick a brand, choose how many you need, and copy structurally valid numbers complete with a random future expiry and CVC.

How it works

Each number is built from a real test BIN prefix for the chosen brand, padded to the brand’s length with cryptographically random digits (crypto.getRandomValues with rejection sampling to avoid modulo bias). The final digit is the Luhn (mod 10) check digit: every second digit from the right is doubled (subtracting 9 if over 9), all digits are summed, and the check digit is chosen so the total is divisible by 10 — the same test front-end validators run.

BrandPrefixesLengthCVC
Visa4163
Mastercard51–55, 2221, 2720163
American Express34, 37154
Discover6011, 65163

Example

Choosing Visa might yield 4929 9384 1057 2098 — it starts with 4, is 16 digits, and its last digit satisfies the Luhn checksum, so it passes a typical card-field validator. It is paired with a random expiry like 08/29 and a 3-digit CVC.

These numbers are not real cards: they hold no funds and can never be charged. Everything is generated in your browser and nothing leaves your device.

Ad placeholder (rectangle)