test data · generator
Fake credit card generator
Generate Luhn-valid card numbers with valid IIN prefixes (Visa: 4xxx, Mastercard: 51-55, Amex: 34/37). These are STRUCTURALLY valid but NOT real cards — payment networks reject them.
intermediate
seedable
Sample output
fakeit cc --brand=visa --count=2 4111111111111111 4012888888881881 fakeit cc --brand=mastercard --count=2 5555555555554444 5105105105105100 fakeit cc --brand=amex --count=2 378282246310005 371449635398431
Safe vs unsafe examples
| Input | Result |
|---|---|
| 4111111111111111 (Visa test card — Luhn-valid, payment networks reject) | ✓safe to use |
| 5555555555554444 (MC test card) | ✓safe to use |
| 378282246310005 (Amex test card — note: 15 digits) | ✓safe to use |
| **WARNING**: NEVER use real card numbers in tests. Real card detection: log scrubbers should redact ANY 13-19 digit string regardless of test/real status. | ✗avoid |
| 4111111111111112 (LUHN FAILS — wrong check digit) | ✗avoid |
| 1234567890123456 (NO BRAND PREFIX — fails IIN lookup) | ✗avoid |
Edge cases & caveats
Luhn (mod-10): from rightmost, double every second digit; if doubled >9, subtract 9. Sum all digits. Sum mod 10 must = 0.
Note: see the warning above. Treat this page as a starting point, not a security control.
Common use cases
- Payment integration QA
- PCI compliance testing (with controlled test cards)
- Form validation development
- Stripe / Adyen sandbox testing
Generate fake data at scale
fakeit generates realistic fake test data — names, emails, IBANs, ISBNs, phones, addresses. Seedable, schemable, MIT-licensed, no telemetry.
Open fakeit
Related
ip addresses (rfc 5737 / rfc 3849) · ip addresses (rfc 5737 / rfc 3849) · ip addresses (rfc 5737 / rfc 3849) · ip addresses (rfc 5737 / rfc 3849) · ↗ validate card brand prefix