Skip to main content
~/makemydev/credit-card-generator

$credit-card-generator

Generators

Generate Luhn-valid test credit card numbers for Visa, Mastercard, Amex, and Discover. For development and testing only.

For testing purposes only. These are not real credit card numbers and cannot be used for purchases. They are Luhn-valid numbers generated for use in development and payment integration testing.

Card Network

Visa: 16 digits, prefix 4

About test card numbers

These numbers pass the Luhn algorithm (mod-10 check), which is the same checksum validation real card processors use. This makes them suitable for testing payment form validation, checkout flows, and API integrations.

Visa

16 digits, starts with 4

Mastercard

16 digits, starts with 51–55

American Express

15 digits, starts with 34 or 37

Discover

16 digits, starts with 6011

// how-to

How to generate test credit card numbers

Generate Luhn-valid card numbers for Visa, Mastercard, Amex, and Discover — strictly for testing payment integrations.

  1. Pick a network

    Choose Visa, Mastercard, American Express, or Discover. The generator uses the correct BIN and length.

  2. Generate numbers

    Click Generate to produce a Luhn-valid test card number, expiry, and CVV.

  3. Use in a sandbox only

    These numbers pass checksum validation but are NOT real accounts. Use only in Stripe, Adyen, or similar sandbox environments.

  4. Copy fields individually

    Copy card number, expiry, and CVV separately with one click each.

// faq

? Can I use these numbers for real purchases?
No. They pass the Luhn checksum but are not issued by any bank. Attempting to use them on a live payment processor is fraud and will fail.
? Are these the same as Stripe test numbers?
Not exactly. For Stripe-specific test cases (declines, 3DS), use the numbers in Stripe docs. Our generator is useful for generic Luhn/format validation.
? What is the Luhn algorithm?
A simple checksum that validates most card numbers. It does not confirm the account exists — just that the number is well-formed.