Coupon Code Generator
Make coupon codes for a campaign, a welcome offer or a bulk import. Set the length, character set, prefix, suffix or a full pattern.
Settings
Set the shape of the codes before you generate a batch.
Pattern tokens: * = selected type, # = number, A = uppercase, a = lowercase.
Insert separator every N characters in the random body. Leave empty for no separator.
Drop ambiguous characters
Removes 0, O, 1, I and l so printed codes do not get misread.
Make a batch
Turn this on for campaign batches and CSV export.
-Your codes
Codes you generate will show up here.
Nothing generated yet
Set the format on the left, then generate one code or a batch to export as CSV.
How it works
Three steps, no account, and nothing leaves your browser.
Set the format
Choose a length, a character set, and a prefix or suffix if you want one. If you need an exact structure, type a pattern like SAVE-****-## and it follows it to the character.
Generate
One code, or switch on bulk mode for up to 500 unique ones in a batch. It all runs on your machine, so nothing is sent anywhere.
Copy or export
Copy a single code, copy the lot, or export a CSV. The file lands in your downloads ready for Shopify, WooCommerce or anything else that takes a bulk import.
Pattern reference
Patterns let you fix every position in the code. Mix literal text with the tokens below.
| Token | Meaning | Example |
|---|---|---|
| * | Random character from your selected character type | **** → KXMT |
| # | Random digit (0-9) | #### → 4729 |
| A | Random uppercase letter (A-Z) | AAA → QWL |
| a | Random lowercase letter (a-z) | aaa → mxf |
| Any other | Kept as-is (literal character) | SAVE- → SAVE- |
Patterns worth stealing:
SAVE-****-##→ SAVE-KXMT-47Branded code with a numeric tail. Easy to read out over the phone.
####-####-####→ 8271-4930-6152Gift-card shape that customers recognise straight away.
VIP-aaaa-##→ VIP-kqmz-83Lowercase loyalty codes, visually separate from your normal promos.
BF24-****→ BF24-W9XTCampaign tag up front. BF24 tells you it was Black Friday 2024.
WELCOME##→ WELCOME47Short enough to sit in a welcome email subject line.
##AA-##AA→ 47KW-93LMDigits and letters alternating, so they are harder to guess in sequence.
Who uses this
Coupon codes are not just a big-retailer thing. A few ways people use this.
Online stores
Single-use codes for cart discounts. Shopify and WooCommerce both take a CSV of codes, so a batch drops straight in.
Email campaigns
A unique code per subscriber tells you exactly who redeemed, and shows you when one gets forwarded around.
Creators and affiliates
Give each creator a branded code like JOHN-XXXX so their audience knows it is theirs and you can attribute the sale.
Giveaways and contests
Generate a batch and send one to each winner. Nobody can pass a used code around, because every one is different.
Loyalty and rewards
Codes for repeat customers that feel personal rather than mass-produced. A prefix per tier keeps the reporting simple.
Launches and beta access
Limited codes for early pricing or beta invites. Numeric-only works well if people are typing them on a phone.
What to watch out for
Things that go wrong often enough to be worth saying out loud.
Keep codes 8 to 12 characters
Under 8 and collisions start showing up once you are into the thousands. The maths tightens faster than you would think. Over 12 and people mistype them at checkout, which turns into support tickets. Eight to twelve stays unique without being a chore to type off a screenshot.
Let the prefix do the record-keeping
KXMT47W9 means nothing to you six months on. BF24-KXMT47 tells you it was Black Friday 2024 without opening a spreadsheet. You spend a few characters of randomness and save yourself the tracking work. Useful prefixes: the campaign (BF24, SUMMER), the channel (EMAIL, IG), or the tier (VIP, NEW).
Drop ambiguous characters if it gets printed
O and 0 are the same shape in most sans-serif fonts, and so are I, l and 1. On screen people cope. On a flyer, a card or a packaging insert it turns into support emails. Switch on Exclude ambiguous characters any time the code might end up on paper or in a PDF.
Uppercase alphanumeric is the safe default
Mixed case looks more random and causes more problems. Email clients capitalise the first letter, mobile keyboards fight you with autocorrect, and reading one aloud means saying lowercase m instead of just M. Uppercase avoids all of it and costs you almost nothing.
Make more than you need
Need 200? Generate 300. A few will trip your platform profanity filter, because random strings occasionally spell something unfortunate. Others may clash with an old campaign you never switched off. The spares mean you are not stopping mid-campaign to make more.
Do not reuse a code across campaigns
It is tempting, since the code is already in the system and the landing page exists. But when someone searches your old code and finds it still working on a new promotion, you give away margin you did not plan to. Fresh codes each time.
Questions about this tool
The things people ask most.
Yes, and there is nothing to sign up for. It runs in your browser with JavaScript, so there is no server cost on our side to recover. We would rather you knew the site existed.
No. Nothing leaves your browser. Generation uses the built-in crypto random source on your device, and we never see the output.
Through the pattern field, yes. Any character that is not a token is kept exactly as typed, so SAVE_****_20 gives you the underscores.
500 per batch. That is deliberate: past 500 the browser starts to struggle on slower machines, and most campaigns do not need more in one go. Run it again for another batch.
Within one batch, yes. It keeps a Set and carries on generating until the count is met. Across separate batches it cannot know, so use a different prefix if that matters.
Yes. The CSV is a single column with a code header, which is the format both expect. Most other platforms take it as-is too.
It works out how many unique codes your current settings can produce. When that number is close to how many you are asking for, collisions get likely, so it suggests a longer code or a wider character set.
Prefix and suffix sit outside the random part and are always literal. A pattern controls every position, including where the random characters land. Use a pattern when the exact shape matters.
Once the page has loaded, yes. Everything runs on your machine with no network calls, so you can pull the plug and keep generating.
Two cases mainly: redemption over the phone, where digits are quicker to read out, and anywhere a keypad is involved. Numeric codes need to be longer for the same uniqueness, so add a few characters.
Looking for codes that already work?
This tool only makes the code itself. If you are shopping rather than running a promotion, the store pages have real codes we have checked.