Generate custom bulk serial numbers: supports prefix/suffix, character sets (digits/upper/lower/mixed), multiple checksum algorithms (Luhn / simple modulo) and exclusion of ambiguous characters. Perfect for software activation codes, gift cards, coupons, product SKUs.
Serial numbers (product keys / coupon codes) are widely used for software activation, gift cards, inventory management and marketing campaigns. A well-designed serial number should provide: uniqueness, randomness, verifiability (checksum) and readability. This tool builds the core using cryptographically secure pseudo-random numbers (Crypto.getRandomValues), allows prefix/suffix, custom character sets, and offers two checksum algorithms: Luhn algorithm (credit/gift card standard, ISO/IEC 7812) and simple modulo checksum (to prevent casual tampering).
? Simple modulo checksum example: sum of character indices (in the charset) modulo |charset|, then pick the corresponding character as the check digit.
? Luhn algorithm (double-add-digit) is widely used for payment card numbers and can detect any single‑digit error and most adjacent transpositions.
Generation process: build a valid character array from the selected charset (if “exclude ambiguous” is checked, filter out '0','O','I','l','1'). For each serial, first generate a random string of the specified length (using window.crypto.getRandomValues for strong randomness), then compute and append a checksum character according to the chosen method:
If “Enforce uniqueness” is enabled, the generator uses a Set to track already generated codes and regenerates on collision (up to 10,000 attempts, otherwise warns about insufficient space). A warning is shown if the theoretical maximum (charset size ^ length) is too small for the requested quantity.
Math.random.
All examples below are generated by this tool and pass checksum verification where applicable.
| Type | Parameters | First 5 samples | Checksum valid? |
|---|---|---|---|
| Numeric coupon | len=6, digits, no checksum | 482105, 739260, 014837, 562391, 978423 | — |
| Gift card (Luhn) | len=15+1, digits, Luhn | 453201511289034, 491683510123456, 557382001234567 | ✓ |
| Software key | len=8, alphanumeric, simple mod | A3F9B2K1, X7M4N6P2, Q8R5T9Y3, W2E6U4I7, C1V5N8M3 | ✓ |
| SKU with prefix | prefix "PD-", len=6, alphanumeric, no checksum | PD-4A7F2B, PD-8K1M9X, PD-3T6R5W, PD-9P2Q4N, PD-0C7V3B | — |
An online merchant needed to issue 500,000 unique coupon codes for a sales event. Requirements: 12‑character alphanumeric, simple modulo checksum to reject random guesses, and exclude ambiguous characters (0,O,I,l). Using this tool with charset “alphanumeric”, length 11 + 1 checksum, and “exclude ambiguous” enabled, 500k codes were generated in about 3 seconds (browser dependent) and exported as CSV. The checksum allowed the backend to quickly reject 97% of fraudulent entries without database lookups.
Outcome: zero collisions, full uniqueness, significant reduction in server load.
The design of serial numbers draws on the following standards: Luhn algorithm (ISO/IEC 7812-1) for payment cards; the randomness approach of UUID v4 (RFC 4122); and GS1 GTIN check digit calculation. This implementation follows these public standards to ensure correctness and practical value.
About the development – This tool is maintained by the GetZenQuery team with contributions from independent developers and cryptography enthusiasts. Our code is regularly reviewed for correctness and performance, and we follow best practices such as using Crypto.getRandomValues and referencing NIST SP 800‑22 recommendations for randomness. The generator has been tested against millions of iterations to ensure statistical uniformity. Last updated: March 2026.