Fake card number generator
Generate Luhn-valid test credit card numbers for UI and integration testing. Numbers pass format validation but will fail real payment processors.
FOR SOFTWARE TESTING ONLY. These numbers are not linked to any real account.
They will be declined by every payment processor. Using fake card numbers to deceive any
payment system is illegal fraud.
Output
How to use
- Choose the card type you need to test (Visa, Mastercard, Amex, or Discover).
- Set the count of card numbers to generate.
- Click Generate test card(s).
- Copy the card number, expiry, and CVV into your payment form's test UI.
Common use cases
- Payment form validation testing — verify that your card number field accepts valid formats.
- UI mockups — show a realistic card number in a dashboard screenshot.
- Integration tests — generate varied card data without using real card numbers in test fixtures.
- Card-type detection testing — verify your Visa/Mastercard/Amex detection logic with real prefix patterns.
Also see: Fake Name Generator for test user profiles, UUID Batch Generator for transaction IDs.
よくある質問
- What does "Luhn-valid" mean?
- The Luhn algorithm is a checksum formula used to validate credit card numbers for basic formatting errors. All real card numbers pass it. This generator produces numbers that pass the same check, so they are accepted by payment form validation — but they are not linked to any real account and will be rejected by actual payment processors.
- Can these numbers be used for real purchases?
- No. They will be declined by every payment processor because they are not registered in any card network database. They are only useful for testing the front-end validation logic in payment forms.
- Is using fake card numbers for anything other than testing legal?
- Attempting to use fake card numbers to deceive any payment system is fraud and is illegal in every jurisdiction. This tool is provided strictly for software testing, UI development, and educational purposes.
- What card types are supported?
- Visa (16-digit, prefix 4), Mastercard (16-digit, prefix 51–55), American Express (15-digit, prefix 34 or 37), and Discover (16-digit, prefix 6011). More BIN prefixes may be added in future versions.
- What is the expiry date?
- The generated expiry date is always set to a date at least 12 months in the future from today, making it valid for testing forms that check whether a card is expired.
- What is the CVV?
- The CVV is a randomly generated 3-digit (or 4-digit for Amex) number. It does not correspond to any real CVV and will fail any real CVV check.
- How is this different from published test card numbers?
- Card networks like Stripe and PayPal publish fixed test card numbers (e.g. 4242 4242 4242 4242). This generator creates random Luhn-valid numbers useful when you need varied card data or are not using a specific payment provider's sandbox.
- Is the generation done in my browser?
- Yes. All numbers are generated locally using the Web Crypto API. No card numbers, expiry dates, or CVVs are sent to any server.