Skip to content

Rex, your AI assistant: the busywork, handled. The ideas, yours 👉 Meet Rex

Free tool

Discount code generator

Create unique coupon codes in bulk for your webshop, newsletter or competition. Free, no sign-up, and the codes never leave your browser.

Characters

The codes are made with your browser's cryptographic random number generator, and no code appears twice in a batch. The CSV file has one column called "code". Nothing is sent to our servers, so save your codes before you leave the page.

How to choose good discount codes

A unique code is a code that can only be used once. Unlike one shared code such as SUMMER10, it can't be passed around on coupon sites, and you can see exactly which code was used for which order.

  • Length. Longer codes are harder to guess. 8 characters is a common choice. People who type the code by hand prefer shorter codes, so don't go longer than you need.
  • Characters. Letters and digits give the most combinations for a given length. Digits only are easy to type on a phone but need more characters to be safe.
  • Look-alike characters. 0 and O, and 1, I and L, are easy to mix up when people read a code from an email or a printed card. Leaving them out saves you customer service questions.
  • Prefix. A prefix such as XMAS- or NEWS- shows where a code came from. It is the same in every code, so it does not make the codes harder to guess.

How many combinations you need

The number of possible codes is c^L (c to the power of L), where c is the number of characters you allow and L is the length. Letters and digits without look-alikes are 31 characters, so 8 characters give 31^8 = 852,891,037,441 possible codes.

The share of valid codes is the chance that a random guess works. If you create 10,000 codes from 852 billion combinations, a guess works about once in 85 million tries. If your codes use more than 1% of the combinations, more than 1 guess in 100 works, and the tool warns you. Make the codes longer or allow more characters.

Unique codes as prizes in Scratcher

Unique codes work well as prizes in games and competitions. In Scratcher, you add your own codes as an instant-win prize: each winner gets one of your codes, and each code is only given out once. You can use them in a spin the wheel game, a scratch card or any other format. Read more about instant wins and prize draws, and get ideas in lead magnet ideas beyond the 10% discount.

Handing out codes on paper, in a shop or at an event? The printable coupon generator puts a unique code on each coupon. To see what a discount costs compared with a prize, use the discount vs prize calculator.

How to add the codes to your webshop

Most webshop systems can create a discount with many single-use codes, either by importing a list or by pasting the codes in. The steps differ from system to system, so check your shop's help pages. In general:

  1. Create the discount in your shop first: the amount or percentage, the minimum order, the expiry date and the products it applies to.
  2. Set each code to be used once, if your shop has that option.
  3. Import or paste the codes from the CSV file or the list above.
  4. Test one code at the checkout before you send them out.

Keep the CSV file somewhere safe. Anyone who has the list can use the codes.

Questions

Questions about the discount code generator

Book a meeting
  • Yes. You can generate as many batches as you like, and you don't need an account.

  • Yes, within a batch. Every new code is checked against the codes already in the batch, and a repeat is replaced with a new one. Codes from two different batches are not compared, so make all the codes for one campaign in a single batch.

  • No. The codes are made in your browser and are not sent to our servers or stored. Copy them or download the CSV file before you leave the page.

  • Up to 10,000 per batch, from 4 to 20 characters each plus an optional prefix. If you ask for more codes than your settings allow, the tool tells you to make the codes longer or allow more characters.

  • Yes. In Scratcher, you upload your codes as an instant-win prize, and each winner automatically gets their own code.