Exporting discount codes

You can export your discount codes to a CSV file from the Discounts page of your Shopify admin to see a broad overview of your discount code history.

CSV files

CSV stands for Comma Separated Values, and it's a file format (.csv) for spreadsheets. Shopify accepts the import and export of CSV files for the products, customers, orders (export only), and discounts (export only) of your store.

CSV files might seem intimidating at first, but when you understand what the text and characters represent in a spreadsheet, you might use it to perform some bigger tasks (such as bulk editing products and discounts).


A CSV file with UTF-8 encoding is the only file format that can be used to import to or export from Shopify.

In a CSV file, each entry represents a cell in a spreadsheet, each line represents a new row, and each comma indicates where one entry ends and another one begins.

For example, the entries in this customer CSV file:

Csv file1

look like this in a spreadsheet program:

Csv file2

Shopify recommends using Google Sheets to view a formatted version of your CSV files. To use Google Sheets, you must import the CSV file into the program. CSVs are useful for stores that:

  • are switching to Shopify from another e-commerce platform
  • have a list of customer accounts
  • prefer to upload products using a spreadsheet
  • temporarily have limited internet connectivity.

Export your discount codes

To export discount codes:

  1. From your Shopify admin, click Discounts (or press G D):


  2. From the Discounts page, click Export:

    Export discounts

  3. Click one of the following export options:

    • Current page to export the discounts showing in your admin
    • All discounts to export all your store's discounts
    • Selected discounts to export discounts you have selected
    • Current search to export a filtered list of discounts.
  4. Select which file format you would like:

  5. Click Export discounts to download your discounts CSV:

    Export discount2

After you export your discount codes to a CSV file, you can import it into Google Sheets to view a formatted version of your discounts CSV.

Import your discounts CSV into Google Sheets

To import your CSV in to Google Sheets:

  1. Log in to your Google account.

  2. On the Google Sheets page, click Blank in the Start a new spreadsheet section:

    Sheets start blank

  3. From the Untitled Spreadsheet page, go to File > Import...:

    File import


    A CSV file with UTF-8 encoding is the only file format that can be used to import to or export from Shopify.

  4. Locate and select the CSV file that you want to edit.

  5. In the Import file dialog, select your preferred options under the Import action, Separator character, and Convert text to numbers and dates sections.

  6. Click Import:

    Import file dialog

Your CSV will look something like this after you've uploaded it:

Discount csv sheets

From here you can edit your CSV. When you are done, you can export it from Google Sheets as a CSV file.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free