StageKitListening

Test Cards

Listening
24h active · 10s sync
Luhn & IIN generator

Generate test card numbers

Builds structurally valid PANs with genuine issuer prefixes and check digits for payment sandbox testing.

Leave BIN blank for a mixed batch, or type 1–8 digits to match a range.
Check Luhn validity
Card preview & batch export
Nothing generated yet

Published gateway test numbers (click to copy)

When testing exact gateway states (3D Secure, declines, international failures), use the provider’s deterministic test PANs rather than random numbers.

Module Knowledge Base

Luhn check digits, BIN ranges, and payment gateway testing

ISO/IEC 7812 Luhn MOD-10 · 7 card networks · Stripe & Braintree reference PANs
Quick Answer

Test card generators create syntactically valid Primary Account Numbers matching official issuer BIN prefixes, brand lengths, and the ISO/IEC 7812 Luhn MOD-10 checksum locally in your browser. Use generated batches for checkout UIs and validation rules, and use published Stripe or Braintree reference PANs for deterministic sandbox responses.

ISO 7812Luhn MOD-10 checksum math
7 brandsVisa, MC, Amex, Disc, JCB, Diners, UP
14–16 digitsBrand-accurate PAN & CVC widths
4 formatsPIPE, Plain, CSV, JSON export

Issuer IIN / BIN ranges and brand length rules

Each payment network assigns distinct prefix ranges and shapes: American Express pairs 34 / 37 with 15 digits and a 4-digit CVC, Diners Club uses 14 digits on 300–305, 36, 38, and 39, and Mastercard spans both 51–55 and 2221–2720.

Entering a custom BIN prefix overrides the brand dropdown automatically so generated PAN length and CVC width always match the prefix.

How the ISO/IEC 7812 Luhn check digit works

Working from the right edge of the payload (immediately left of the check digit), double every second digit and subtract 9 whenever doubling exceeds 9. Sum all digits and choose the check digit (0–9) that makes the total divisible by 10.

Because Luhn catches single-digit typos and most adjacent transpositions before submission, the companion validator checks both MOD-10 math and network prefix alignment locally.

Random Luhn batches vs Stripe and Braintree reference PANs

  • Batch Luhn numbers test masked card inputs, brand detection, and fixture exports in PIPE, Plain, CSV, or JSON.
  • Gateway reference PANs listed below the tool exercise deterministic sandbox behaviors such as declines, expired errors, and 3D Secure challenges.
  • Expiry, CVC, and balance toggles reformat the current batch immediately without regenerating existing PANs.

Why generated test cards cannot charge

Synthetic numbers have no issuing bank, no backing ledger, and no EMV cryptographic signature. Real processors reject them instantly, and external gateway test modes accept only their own documented reference lists.

Use generated numbers solely in forms and automated test suites you own or are authorized to test.

Issuer identification number (IIN / BIN) ranges, PAN lengths, and CVC widths by brand
BrandLeading IIN / BIN digitsPAN lengthCVC digits
Visa4163
Mastercard51–55 and 2221–2720163
American Express34, 37154
Discover6011, 65163
JCB3528–3589163
Diners Club300–305, 36, 38, 39143
UnionPay62163
Luhn MOD-10 worked example (payload 4539 1488 0343 646) and sandbox card routing
Stage / Testing needWorked value or required approach
Payload digits (15 digits)453914880343646
Double every 2nd digit from right8 5 6 9 2 1 4 8 0 6 6 4 12 6 12
Subtract 9 where > 98 5 6 9 2 1 4 8 0 6 6 4 3 6 3 → sum 71
Check digit to reach 809 → complete PAN 4539148803436469
Deterministic declines or 3D SecureUse published Stripe or Braintree reference PANs rather than random Luhn numbers

Frequently asked questions

Is this a real card number?
No. Generated numbers have no issuing bank, no account, and no cryptographic CVV signature. They only satisfy syntactic prefix and Luhn checksum validation rules.
Is the number sent anywhere?
No. Both batch card generation and the Luhn validator run completely offline inside browser memory with zero server calls or storage.
What expiry and CVC should I use?
Sandbox modes accept any valid future MM/YY date and a 3-digit CVC (or 4 digits for American Express). The generator includes matching valid future dates and CVCs automatically.
Why does entering a BIN override the Brand dropdown?
Because the leading digits determine the actual card network. Entering 378282 switches output to 15 digits and a 4-digit CVC for American Express so the batch stays valid.
Can I use these numbers to sign up for real trials?
No. Processors decline synthetic PANs immediately, and submitting unauthorized card details for real purchases violates terms and law. Use these exclusively on systems you own or test professionally.
StageKit · Zero trackers · Browser-local security toolsPress 1–5 on desktop to switch tools

Customize address

Generation style

Install StageKit App

Install StageKit as a standalone Android Progressive Web App for fast home-screen launch, full-screen bottom navigation, and offline access to Password, 2FA, Identity, and Card tools.

  1. Open the browser menu in Chrome on Android or desktop.
  2. Tap Add to Home screen or Install app.
  3. Confirm Install to pin StageKit to your launcher.