What you’ll need

  • A discount to add the codes to

    How to get this: A discount to add the codes to
    1. Open Discounts in your admin and click the discount, or Create discount to make a new one.
    2. The tool shows how to look it up by its title.
  • Shopify’s free GraphiQL app (with read_discounts, write_discounts access)

    How to get this: Shopify’s free GraphiQL app
    1. Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
    2. Then open it any time from Apps › Shopify GraphiQL App in your admin.

    Step-by-step guide (opens in a new tab)

  • Shopify CLI (optional, for big batches, instead of the GraphiQL app)

    How to get this: Shopify CLI

    Optional. Install Shopify CLI, sign in once with shopify store auth, then run shopify store execute.

    Open the step-by-step guide (opens in a new tab)

1Your codes

Up to 100,000.

Shown at the start of every code.

8 or more makes codes hard to guess.

Use a pattern instead

# is a number, ? a letter, * any character from the set above. Everything else is kept as typed. A pattern replaces the length and dash settings.

2Which discount gets the codes

Paste the discount’s ID (gid://shopify/DiscountCodeNode/…) or its number. Not sure? Run the lookup query below. Codes are added to this discount and share its value, dates and limits.

Not sure of the ID? Look it up

Run this query in GraphiQL. It lists your 25 newest code discounts with their IDs.

Find discount IDs
query FindCodeDiscounts {
  codeDiscountNodes(first: 25, reverse: true) {
    nodes {
      id
      codeDiscount {
        __typename
        ... on DiscountCodeBasic { title status }
        ... on DiscountCodeBxgy { title status }
        ... on DiscountCodeFreeShipping { title status }
        ... on DiscountCodeApp { title status }
      }
    }
  }
}

3Add the codes to Shopify

Add codes (step 1) and a discount ID (step 2) to get your batches.

4Check the results

Shopify adds codes in the background. Paste the responses from step 3 here. We read the job IDs, then give you a query to check each job. Paste those answers here too and we list any code that failed.

How it works

Shopify has no code import
The admin can export discount codes but not import them. Shopify’s API can, through discountRedeemCodeBulkAdd, up to 250 codes per call.
Nothing to install from us
You run the calls with Shopify’s own free GraphiQL app or Shopify CLI. We never see your store or your codes.
Clean lists
Duplicates that differ only in capitals are removed (Shopify codes aren’t case sensitive), and codes over 255 characters or with spaces are flagged.
Know what failed
Paste Shopify’s answers back in to get a list of codes that weren’t added and why, ready to fix and retry.

Guides

Questions

Can Shopify import discount codes from a CSV?

Not from the admin. Shopify can export discount codes but has no import button. Shopify’s own API can add up to 250 codes per call to an existing discount, which is what this tool sets up for you.

Do I need to install an app?

You need a way to run Shopify’s API on your store. The free route is Shopify’s GraphiQL app (made by Shopify) or Shopify CLI. Both are free. No paid or third-party app is involved.

Are my codes uploaded anywhere?

No. Codes are generated and batched in your browser. They only reach Shopify when you run the mutations yourself.

Are Shopify discount codes case sensitive?

No. SAVE10 and save10 are the same code, so this tool removes duplicates that differ only in capitals. Codes can be up to 255 characters, and Shopify suggests avoiding special characters.

Is there a limit on how many codes I can have?

Shopify allows 20,000,000 unique discount codes per store in total. This tool makes or batches up to 100,000 at a time.

Based on Shopify’s discountRedeemCodeBulkAdd and discountCodeBasicCreate reference (API 2026-10).