Network | Number | CVV | Expiry | Luhn | Copy |
---|---|---|---|---|---|
{{ item.label }} | {{ item.display }} | {{ item.cvv || '—' }} | {{ item.expiry || '—' }} | {{ item.luhnValid ? 'Valid' : 'Invalid' }} |
A Primary Account Number (PAN) identifies a payment card across networks using an Issuer Identification Number (IIN, often called BIN) plus an account sequence and a check digit. This tool is a focused credit card number generator online for test data, applying the Luhn (mod 10) checksum so outputs validate like real PANs while remaining synthetic. It supports common network formats and grouping styles to mirror how numbers typically appear in logs, fixtures, and QA scripts.
You provide high-level inputs such as target network, quantity, optional starting digits, and display preferences. The generator returns digit-only PANs with a computed check digit, and can also add a synthetic card verification value (CVV/CVC) and a future expiration date in month/year format. Results can be copied, saved, or exported for automated tests and data seeding without exposing real customer details or connecting to payment services.
Consider a developer populating a staging database to test fraud screening and formatting logic. They generate a set of network-specific PANs, include a reproducible seed for stable fixtures, and add expirations to exercise date parsing. The Luhn-valid outputs then drive unit tests and end-to-end flows without touching live credentials or gateways. Only use generated numbers in controlled test environments; never attempt real transactions or store sensitive production data alongside them.
A payment PAN consists of a network-specific prefix (IIN/BIN), a variable-length account identifier, and a single check digit computed with the Luhn algorithm. This utility synthesizes the account digits and check digit to match network rules while respecting chosen length and prefix constraints. It can optionally emit a CVV/CVC with typical network length conventions and a future MM/YY expiration window for format testing, while allowing user-selected display grouping and masking for safe on-screen handling.
Luhn (mod 10) check digit:
Here, digits are indexed from the rightmost position of P (excluding the final check digit). Doubling applies to every second digit from the right as shown above; the final check digit is c.
Network | Typical Lengths (digits) | Grouping Pattern | IIN/BIN Prefix Rules |
---|---|---|---|
Visa | 13, 16, 19 | 4-4-4-4 | 4 |
American Express | 15 | 4-6-5 | 34, 37 |
Mastercard | 16 | 4-4-4-4 | 51–55, 2221–2720 |
Discover | 16, 19 | 4-4-4-4 | 6011, 622126–622925, 644–649, 65 |
Diners Club | 14, 16 | 4-6-4 | 300–305, 36, 38–39 |
JCB | 16–19 | 4-4-4-4 | 3528–3589 |
Maestro | 12–19 | 4-4-4-4 | 50, 56–69 |
UnionPay | 16–19 | 4-4-4-4 | 62 |
Prefix ranges and length sets are enforced for random network selection and can be checked against any custom BIN/IIN when the corresponding toggle is enabled.
Field | Threshold Band | Meaning |
---|---|---|
Luhn Status | Valid | Number passes mod-10 and includes a correct check digit (generator output by design). |
Luhn Status | Invalid | Fails mod-10; occurs only if a PAN is altered externally after generation. |
CVV/CVC Length | Auto: 3 or 4 | 4 for American Express; 3 for others; manual 3/4 override available. |
A “Valid” Luhn result means format-level plausibility only; it does not imply an active account, authorization capability, or issuer acceptance.
Parameter | Meaning | Unit/Datatype | Typical Range | Notes |
---|---|---|---|---|
Card Type | Target network for prefixes, lengths, and grouping. | Enum | 8 options | Visa, AmEx, Mastercard, Discover, Diners, JCB, Maestro, UnionPay. |
Quantity | How many PANs to generate. | Integer | 1–100 | Clamped in code; interface indicates a 100-number limit. |
Custom BIN/IIN | Starting digits to constrain generation. | Digits | up to L−1 | Non-digits stripped; truncated so a check digit fits. |
Length Override | Total PAN length if overriding the default. | Digits | 12–24 | Zero selects the network default; override is clamped to 12–24. |
Display Format | On-screen grouping style. | Enum | plain/spaces/dashes | Visual only; clipboard/export always use digits. |
Mask Last | Hide trailing digits in display. | Digits | 0–L | Replaces digits with “•”; separators preserved. |
Include CVV/CVC | Emit synthetic verification code. | Boolean + mode | 3 or 4 digits | Auto or explicit 3/4 selection. |
Include Expiry | Add MM/YY within a future window. | Boolean + months | 1–120 months | Uniform month offset; local time basis. |
Enforce Network Prefix | Ignore invalid BINs for the chosen network. | Boolean | on/off | When on, invalid custom BINs are discarded. |
Seed | Deterministic RNG seed string. | Text | any | Hash-mixed, non-cryptographic PRNG; stable sequences per seed. |
Goal: Compute the Luhn check digit for a partial PAN ending with …411111111111111
.
Final PAN: appends 1
as the check digit, producing a Luhn-valid number for testing.
Specification and structure follow ISO/IEC 7812 for IIN/BIN and PAN formatting; the Luhn mod-10 algorithm is described in ISO/IEC 7812-1. EMVCo documentation informs network conventions. PCI DSS provides guidance on handling cardholder data in testing contexts.
Processing occurs entirely in your browser; the code performs no network requests, and exports are created locally. Clipboard copies and CSV/JSON downloads contain only synthetic data. Outputs are educational and not financial advice. Numbers are algorithmic test values and will not work for transactions.
Configure generation once, then export or copy results for tests and fixtures.
credit_card_numbers.csv
), or download JSON containing inputs and results.Example: Select Visa, set quantity to 5, provide a 6-digit BIN, include CVV and a 6–18-month expiry window, and add a memorable seed. You get five Luhn-valid PANs with CVVs and MM/YY expirations ready for fixtures.
Warning Do not submit generated numbers to live gateways or acquirers; use sandbox environments only.
No. Generation, copying, and file creation happen locally in your browser. The code makes no network requests, and exports are produced client-side only.
Between 1 and 100. The input is clamped in code and the interface documents the 100-number limit.
Visa, American Express, Mastercard, Discover, Diners Club, JCB, Maestro, and UnionPay, each with their documented prefix rules and typical lengths.
No. Masking is visual; copy and export always use raw digits, never the masked representation.
Yes. Provide any seed string to create a deterministic sequence with a fast 32-bit PRNG. Use the same inputs and seed to reproduce results.
It implements the standard mod-10 algorithm and produces correct check digits. Passing Luhn indicates structural plausibility, not a valid or active card.
With “enforce network prefix” enabled, an invalid custom BIN is ignored and a valid network prefix is used instead.
Yes, once loaded. All logic and exports run locally, so no connectivity is required after the page is available in your browser.
No explicit license metadata is included in the provided files. Consult your organization’s terms before redistribution or public use.