Coupon Code Generator: unique discount codes, terms and print cards
Make many unique discount codes, with the offer terms, CSV and TXT files and coupon cards to print.
- Free to use
- Runs in your browser
- No sign-up
Your codes show here
Choose a prefix or pattern and how many codes you need. Press Try an example to see 200 codes for a Diwali offer.
Embed this tool on your websiteFree. Paste one code; it runs in your visitors' browsers.
Copy this code into a page of your site. The tool sets no cookies and sends nothing your visitors type to us. Change height="760" if it needs more room.
How it works
-
Choose "Prefix and random characters" or "A pattern", the characters to use and how many codes you need. Paste any codes you already use, so new ones never repeat them. Press Try an example to see 200 codes for a Diwali offer.
-
Fill in the offer: the discount, any cap, the minimum order, the start and end dates and how often a code can be used. The terms and the cards update as you type, and the checks flag codes that are easy to guess or an end date that has passed.
-
Copy the codes or download the CSV or TXT file, copy the terms, and print the coupon cards. Set the same terms on the discount in your shop before you share the codes.
About the Coupon Code Generator
Choose a prefix and how many random characters each code gets, or a pattern such as DIWALI-XXXX-##, and how many codes you need, up to 10,000 at a time. The tool makes codes that never repeat each other or a list of codes you already use, and can leave out look-alike characters such as 0 and O. Fill in the offer, minimum order, dates and limits to get the terms to show next to the codes, then copy the codes, download them as CSV or TXT, or print A4 sheets of coupon cards. It runs in your browser with your device's own random numbers: nothing is uploaded and no shop account is connected.
How the codes are made
Each random character comes from your browser's cryptographic random number source (crypto.getRandomValues), with every allowed character equally likely. Codes are in capital letters, and the prefix and pattern keep only letters, numbers, hyphens and underscores (our suggestion, as other characters are easy to mistype). The tool shows how many different codes your settings allow and how often a random guess would find a working code (our measure), and asks for more random characters when that is too easy. Codes that a spreadsheet would change, such as all-number codes starting with 0, are skipped.
Using the codes in your shop
Shopify Help says discount codes cannot be imported to a store with a CSV file: you set up the discount in the admin, with its minimum purchase, active dates and maximum uses, and apps or developers load many unique codes through Shopify's Admin API. In WooCommerce each coupon has settings such as minimum spend, expiry date, individual use only and usage limits, and the tool gives a CSV with WooCommerce's REST API field names for a developer. Either way, set the same terms in your shop as on the cards.
What this tool cannot do
It does not create discounts in your shop, check which codes have been used, or connect to Shopify, WooCommerce or any marketplace. It does not know your shop's rules for code length or capital letters, so test one code at checkout before you share a batch. Codes made here are kept only in this browser; download them before you clear it. The notes on offers and GST are not legal or tax advice; check with your CA or lawyer.
Frequently asked questions
How many random characters should a code have?
Our suggestion is at least 6, and 8 for codes worth a lot. With letters and numbers and the look-alikes left out, 8 random characters allow over 85,000 crore codes, so a random guess almost never finds one of yours. The tool shows the odds for your own settings (our measure).
Can I import these codes into Shopify?
Shopify Help says discount codes cannot be imported to a store with a CSV file. You create the discount in the Shopify admin, and an app or a developer can add many unique codes to it through Shopify's Admin API, which takes up to 250 codes at a time. Give them the TXT or CSV file from this tool.
Does WooCommerce import coupons from a CSV?
We did not find a coupon import built into WooCommerce in its documentation. Coupons are set up one by one, or in bulk by a developer through WooCommerce's REST API or by an extension. The developer CSV here has one row per code, with columns named after the REST API's coupon fields.
Can I say the offer is limited or ends soon?
Only if it is true. False urgency or scarcity is one of the dark patterns listed in the CCPA's Guidelines for Prevention and Regulation of Dark Patterns, 2023. Give a real end date, stop the codes on that date, and show the terms next to the code, in the same language as the offer.
Are my codes saved?
The last batch and your settings are saved only in this browser, so the print sheet matches the file you downloaded. Nothing is uploaded. Press Clear to remove them, and download the codes first if you still need them.
More e-commerce tools
All 30 e-commerce tools- Marketplace Fee and Profit Calculator Compare payout, profit and break-even price per order on Amazon.in, Flipkart, Meesho and your own shop.
- SKU Profit Analyzer Find the SKUs that lose money after fees, returns, ads and shipping, with the price or fix for each one.
- Marketplace Payment Reconciliation Match orders with payments to find unpaid orders, short payments and extra charges, with a claim list.
- Discount and Sale Price Calculator See what the buyer pays, the real discount on MRP, the GST inside the price and your margin after an offer.
Related reading
Want help selling online?
Tell us about your shop and what you want it to sell. We reply within one business day.
Talk to usWant us to fix what the tool found?
Tell us about your business and what you want to grow. We reply within one business day with next steps, not a sales script.
- A reply within one business day
- A quick look at your site and search visibility before we talk
- Your details are only used to answer your enquiry