Tiny Online Tools logoTiny Online ToolssearchSearch tools…grid_viewAll Tools
Homechevron_rightSecurity Toolschevron_rightCredit Card Generator (Test)Credit Card Generator (Test)

Credit Card Generator (Test)

Generate syntactically valid TEST credit card numbers (Luhn-valid) for Visa, Mastercard, Amex, Discover and JCB — for development only.

warningTEST ONLYThese numbers are Luhn-valid but are not real cards. They cannot be used for real purchases, subscriptions, or any transaction. Use only for development and testing.

Similar Tools

Fake Phone Number Generator

Fake Phone Number Generator

Generate fake phone numbers in country-specific formats using reserved or fictional prefixes safe for testing.

Fake Address Generator

Fake Address Generator

Generate random fake postal addresses for eight countries, including street, city, region, postal code, and country.

Email Generator

Email Generator

Generate random email addresses for testing and development.

Fake Data Generator

Fake Data Generator

Generate realistic fake data for testing and development — people, companies, and internet data.

Merge PDF

Merge PDF

Merge multiple PDF files into one document quickly and securely in your browser.

Compress Image

Compress Image

Reduce image file size without noticeable quality loss.

JSON Key Renamer

JSON Key Renamer

Rename keys across nested JSON objects and arrays.

apps

More Tools

Browse our full collection of free online tools.

Credit Card Generator (Test Only)

This tool generates credit card numbers that satisfy the Luhn (mod-10) check for Visa, Mastercard, American Express, Discover, and JCB. It produces random but structurally correct numbers — including the right length, IIN (issuer identification number) prefix, and a correctly-calculated Luhn check digit — alongside a matching random expiry, CVV and cardholder name.

TEST ONLY — READ THIS

These numbers are NOT real credit cards. They are not linked to any bank, account, or payment processor. They exist solely for development and QA. Attempting to use a generated number for a real transaction will fail and may be fraud.

Using any credit card number you did not receive from a real issuer to purchase goods, services, or subscriptions is illegal in most jurisdictions. Don't.

What it's actually useful for

  • Client-side form validation — build and test UI that checks card length and Luhn.
  • Design mockups — show realistic-looking card numbers in screenshots without exposing real card data.
  • Unit & integration tests — seed test databases with valid-shape card numbers.
  • Teaching materials — demonstrate the Luhn algorithm with real-looking data.
  • Payment gateway sandboxes — some sandboxes accept Luhn-valid numbers for smoke tests (many also require specific documented test numbers — check your provider).

How the generation works

  1. A brand-specific IIN prefix is chosen (e.g. 4 for Visa, 5155 or 22212720 for Mastercard, 34/37 for Amex, 6011/65 for Discover, 35283589 for JCB).
  2. Random body digits are appended up to total length − 1.
  3. The Luhn check digit is computed and appended.
  4. Output is formatted with brand-appropriate spacing (4-4-4-4 for most brands, 4-6-5 for Amex).

Brands & lengths

BrandPrefixesLength
Visa416
Mastercard51-55 / 2221-272016
American Express34, 3715
Discover6011, 6516
JCB3528-358916

Again: use these numbers only in development environments. Never attempt a real purchase with a generated card.