Random codes and patterns
Random codes use a prefix you choose, then a set number of random characters. The prefix tells you where a code came from (FLYER-, VIP-, XMAS-), which helps when you check your sales later.
Patterns give you full control. A # is a random number, a ? is a random letter and a * is either. Everything else is kept as typed, so VIP-####-?? makes codes like VIP-4827-KM.
Making codes hard to guess and easy to type
Every character is drawn with your browser's crypto.getRandomValues, the same secure randomness used for passwords, and each code in a batch is unique. The stats show how many codes your settings allow and the odds that someone guesses a real one. For valuable discounts, aim for at least a million to one.
- Leave out look-alikes (0, O, 1, I and L) for codes people type from paper.
- Group long codes in fours: ABCD-EFGH is easier to read out.
- Eight random characters is plenty for most shops.
- Use numbers only for codes people enter on a phone keypad.
Keeping track of your codes
Keep the CSV. Add columns for who got each code, the discount and when it was used. Set an end date and a single use per code in your shop's discount settings, so a leaked list can't be used forever.
Frequently asked questions
Are the coupon codes really random?
Yes. Each character comes from crypto.getRandomValues, the browser's secure random generator, without bias, and duplicates are removed so every code is unique.
How many codes can I make at once?
Up to 5,000 per batch. The page shows the first 200; Copy all and Download CSV include every code. Tap New codes for another batch.
How do I import codes into Shopify?
Create the discount in Shopify, then add your codes with a bulk discount code app. Upload or paste the codes from the CSV, limit each code to one use, and save.
How long should a coupon code be?
Six to eight random characters for most uses, plus a short prefix. Shared codes that people need to remember work best as a word and a number, like SPRING20.
Are my codes stored anywhere?
No. They're made in your browser and never sent to a server. Download the CSV if you want to keep them, because a refresh makes a new batch.