Discount Code Generator

Make up to 100,000 unique discount or coupon codes at once, ready for Shopify. Everything runs in your browser.

Up to 100,000 with this pattern.

Characters

AB12CD34 becomes AB12-CD34. The dashes are added on top of the length.

A .csv or .txt file with one code per line, or a column named “code”. New codes skip these in any letter case. The file stays on your device.

Your codes

A code with these settings

WELCOME-LM3069DG

2.8 trillion possible codes

Set the pattern, then generate.

    How to generate discount codes

    1. Choose how many codes you need, up to 100,000 at once.
    2. Set the pattern. A prefix such as WELCOME- tells staff and customers which campaign a code belongs to. Then pick the length and the characters of the random part.
    3. Add the codes you already use (optional), so no new code repeats one of them.
    4. Generate, then copy the list or download it as a CSV or TXT file.

    How to add the codes to Shopify

    Shopify’s discount form takes one code per discount. To put a whole list on one discount, an app adds the codes through Shopify’s Admin API. CodeOS does this free: pick the discount, choose Import your own codes and add the CSV from this page, or let CodeOS generate the codes for you. Every code then carries the discount’s value and rules. The walkthrough, screen by screen, is in how to create bulk discount codes on Shopify.

    How hard are these codes to guess?

    A guess works if it matches any code on your list, so the odds are your number of codes divided by the number of possible codes. This table shows how many codes each pattern can make.

    Possible codes for each random part length, before any prefix or suffix.
    Random partLetters and numbersLetters onlyNumbers only
    6 characters 2.2 billion308.9 million1 million
    8 characters 2.8 trillion208.8 billion100 million
    10 characters 3.7 × 10¹⁵141.2 trillion10 billion
    12 characters 4.7 × 10¹⁸9.5 × 10¹⁶1 trillion

    With 8 letters and numbers, a list of 100,000 codes still leaves a random guess about a 1 in 28.2 million chance. Short codes made only of numbers are easy to guess, so keep them for small offers.

    One shared code or unique codes?

    A shared code such as SAVE20 is easy to announce, but once it reaches a coupon site anyone can use it, and you cannot tell which email or influencer brought the order. Unique codes go one per customer: set the discount’s usage limit to 1 and each code works once, and every code traces back to the list you sent it to.

    If a shared code has already leaked, you can disable or restrict that discount code instead of ending the sale. DiscountOS Block codes refuses the codes you choose, on the carts you choose, and shows shoppers your own message.

    Questions merchants ask

    How do I create my own promo code?

    Choose a word your customers will recognise as the prefix, such as WELCOME-, and add a random part so every code is different. A code works in Shopify once it is added to a discount: create the discount under Discounts and enter the code. To add a whole list of codes to one discount, use an app such as CodeOS, which is free.

    Are Shopify discount codes case-sensitive?

    No. Shopify matches discount codes regardless of upper or lower case, so SAVE10 and save10 are the same code. This generator writes every code in capitals and compares codes you already have the same way, so a new code never clashes with an old one.

    Are the codes really random?

    Yes. Every character comes from your browser’s cryptographic random number generator, and each allowed character is equally likely. The list is checked as it is made, so no code appears twice.

    Is anything uploaded?

    No. The codes are made in your browser, and a file of codes you already have is read on your device. The codes and the file never leave it.

    How many codes can I make at once?

    Up to 100,000 per run. A short random part allows fewer: the generator keeps each list to at most 10% of the possible codes, so a lucky guess stays unlikely. Lengthen the random part or allow more characters to raise the limit.

    Why skip 0, O, 1, I and L?

    They are easy to misread when a code is printed, written by hand or read aloud. Skipping them means fewer mistyped codes at checkout, in exchange for fewer possible codes.

    Will Excel change my codes?

    It can change codes made only of digits: Excel reads them as numbers, drops leading zeros and rounds long ones. Add a letter prefix, use letters and numbers, or import the CSV column as text.