Test Credit Card Number Generator

Luhn-valid fake card numbers with CVV and expiry, for QA and form testing only.

Developer Tools Free
These numbers are mathematically valid (pass the Luhn check) but entirely fake and not linked to any real account or funds. They're for testing payment forms, QA automation, and development only.

About this tool

Luhn-Valid Test Card Numbers, Without Risking a Real One

Payment form testing needs a card number that actually passes checksum validation, or you're not really testing anything — but you obviously shouldn't use a real card for that. This generator produces fake card numbers that pass the Luhn algorithm (the same check digit formula real card processors use) for Visa, Mastercard, Amex, Discover, JCB, and UnionPay, plus optional CVV, expiry, and a placeholder cardholder name.

How to use it

  • Pick a card brand, or leave it on "Any" for a mixed batch.
  • Choose how many to generate (up to 50 at once) and toggle CVV, expiry date, and cardholder name on or off.
  • Copy a single card with the button next to it, copy the whole batch, or export everything as a CSV for test fixtures or automated test suites.

Real-world use cases

Filling out a payment form during development without triggering a real charge, seeding automated QA/E2E test suites with valid-looking card data, checking that your form's client-side Luhn validation actually rejects bad input by comparing against a known-good number, or demoing a checkout flow without exposing anyone's real card details.

Frequently asked questions

Are these real credit card numbers?

No. They pass the Luhn checksum — the same mathematical formula real issuers use to catch typos — but they aren't issued to any real account, aren't linked to any funds, and won't work at an actual payment processor.

What is the Luhn algorithm?

It's a simple checksum formula used to validate identification numbers, including credit cards: double every second digit from the right, sum all the digits, and the total must be a multiple of 10. It catches most single-digit typos and adjacent transpositions.

Is it legal to generate and use these?

Yes — generating Luhn-valid test numbers is standard practice across the software industry for development and QA. What's illegal is using them (or any card data) to attempt real fraudulent transactions, which these numbers can't do anyway since they aren't tied to real accounts.

Why does American Express have a different format?

Amex cards are 15 digits instead of 16, use a 4-digit CVV instead of 3, and are grouped 4-6-5 instead of in groups of four — this generator formats each brand correctly.

Can I use these in a live payment processor's sandbox mode?

Most payment processors (Stripe, PayPal, etc.) provide their own official test card numbers for sandbox testing, and those are usually the safer choice since the processor recognizes them specifically. This tool is best for generic form validation and Luhn-check testing rather than a specific processor's sandbox.