Mock Credit Card Number Generator (Luhn-valid test data)

Generate fake card numbers that pass the Luhn check, with a future expiry date and CVV, for form validation and UI tests. The numbers are not real accounts and cannot be charged.

Use the tool

Why this tool exists

A checkout form needs test data. Typing 1111 1111 1111 1111 fails the Luhn check, so you cannot see how the valid path behaves, and borrowing a real card for a demo is a bad idea. QA engineers, front-end developers and people writing documentation need numbers that look right and belong to no one.

This tool builds numbers with the correct brand prefix and length, finishes each with a valid Luhn check digit, and adds an expiry date and CVV. A seed option makes the output repeatable for automated tests. For payment sandboxes, use the test cards your provider documents, since only those trigger the provider's test behaviour. Generation happens in your browser.

How to use it

  1. Choose a card brand, or Any to mix the brands.
  2. Set how many cards you want and, optionally, a seed to get the same list again.
  3. Choose whether the numbers are shown with spaces.
  4. Copy the generated numbers, expiry dates and CVVs into your test fixtures or form.

Frequently asked questions

Can these numbers be used to pay for anything?

No. They only satisfy the format and Luhn checksum. They are not linked to any account and payment processors will reject them. Do not use them to try to bypass any real payment system.

Will they work in my payment provider's sandbox?

Usually not. Sandboxes accept their own documented test numbers. Use those for end-to-end tests, and use these only for format checks, validation logic and layout testing.

What does the seed do?

With the same seed and settings you get the same list every time, which helps keep unit tests stable. Leave it blank for a different random list on each run.