Choose a prefix, how many random characters follow it and how many codes you need. The generator draws every code from your browser's cryptographic random source, skips characters people misread such as 0 and O, guarantees no repeats in the batch and shows how many codes are possible, then exports a CSV you can import or paste.
| Platform | Case | Limits worth knowing | Usage controls |
|---|---|---|---|
| Shopify | Not stated on the help page | Up to 20,000,000 unique codes per store in total; avoid special characters | Set in the discount settings |
| WooCommerce | Not case-sensitive (SAVE10 equals save10) | Optional expiry date | Usage limit per coupon and per user; individual use only |
| Stripe promotion codes | Case-insensitive | Unique across active promotion codes; up to 20 discounts on a subscription or invoice | max_redemptions and expires_at |
Updated
A single public code like WELCOME10 is fine for a newsletter. When each customer, influencer or printed flyer should get its own code, you need hundreds of codes that cannot be guessed and do not collide. Typing them by hand invites mistakes; spreadsheet RAND formulas repeat and are not built for secrecy. This page does it properly in a second.
Prefix (optional): FLYER
Join prefix with a dash
Random characters: 8
How many codes (max 5,000): 20
Characters: Letters and digits, Letters only, Digits only
Remove look-alikes (0, 1, I, L, O)
852,891,037,441 possible random parts with these settings.
Codes are made in your browser and never sent anywhere.
The same approach for a script or a back-office page: draw bytes from the cryptographic generator and throw away values that would bias the result.
Runs as written in any current browser console. Bytes at or above the limit are skipped so every character is equally likely.
const SAFE = "23456789ABCDEFGHJKMNPQRSTUVWXYZ"; // 31 characters
function randomCode(length = 8) {
const limit = 256 - (256 % SAFE.length);
const byte = new Uint8Array(1);
let code = "";
while (code.length < length) {
crypto.getRandomValues(byte);
if (byte[0] < limit) code += SAFE[byte[0] % SAFE.length];
}
return code;
}
console.log("VIP-" + randomCode()); // e.g. VIP-7KQ4M9TX
A shared code is easy to promote but spreads beyond the people you meant it for, often onto coupon sites. Unique single-use codes keep the offer with the person who received it and tell you exactly which channel brought each sale.
A middle path is one shared code per channel: a different prefix for the newsletter, each influencer and each print run, so your reports still split by source.
The number of possible codes is the size of the character set raised to the length. Going from 6 to 8 random characters multiplies that space by about a thousand with the safe set, which is why short codes are fine for a shared public offer but not for valuable one-off ones.
Guessing is also limited by your store, which can cap uses, expire codes and require a minimum spend. Combine a decent length with those limits rather than relying on either alone.
Each character comes from crypto.getRandomValues, the browser's cryptographically strong random generator, and characters are picked without bias toward any letter. With 8 characters from the 31-character safe set there are about 853 billion possible codes.
No. The generator keeps drawing until it has the number of unique codes you asked for. If you ask for more codes than the settings allow, it tells you to raise the length instead.
It depends on the platform. WooCommerce says its coupon codes are not case-sensitive, and Stripe says the promotion code string is case-insensitive. Check your own platform's help page if case matters to you.
Each platform has its own import or bulk-create screen, and some only create codes through their API. This page gives you the list; follow your platform's instructions to attach the codes to a discount. We do not connect to any store.
No. They exist only in this tab until you download or copy them, which also means nobody else can see your list.
Related: Percent off calculator, Gift certificate maker, Shopify pricing guide, SKU generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.