Bulk edit Shopify HS codes and country of origin
On this page
If you ship outside your own country, every product needs customs details: an HS code that says what the item is, and the country where it was made. Shopify uses them on international shipping labels and customs forms, and customs uses them to work out duties. A missing or wrong code means a label you can’t print, a parcel held at the border, or a customer paying duties you didn’t expect.
Shopify lets you enter these details on each product page, in its bulk editor, or with a CSV file (compared below). With Mixtable Spreadsheet Editor you get them as spreadsheet columns, one row per variant. You can find every variant that’s missing a code, paste codes from a supplier’s or customs broker’s list, give a whole product type the same code, then review the changes and sync them to Shopify in one go.
The customs fields Mixtable can edit
Each Shopify variant has three customs fields, and Mixtable has a column for each:
| Column | What it holds | What Shopify accepts |
|---|---|---|
| HS code (customs) | The Harmonized System code customs use to classify the item, such as 610910 for cotton T-shirts | A number with 6 to 13 digits |
| Country of origin | The country where the item was made or assembled into the form you sell it in | A two-letter country code, such as US, CN, IT, or PT |
| Province of origin | The state or province where the item was made, when your carrier or customs broker asks for it | A two-letter province or state code, such as ON for Ontario |
The format rules come from Shopify’s developer documentation. The first six digits of an HS code are the same worldwide. Countries can add more digits for their own tariffs, as Shopify’s HS code guide explains.
Type HS codes as digits only. Many tariff lookups show codes with dots, such as 6109.10.00, but Shopify expects 61091000.
Your Shopify admin calls the field Harmonized System (HS) code. You may also see it called a tariff code, and the longer US version is called an HTS code.
Ways to set customs details in Shopify
Shopify gives you three ways to set HS codes and countries of origin, as its HS code guide explains:
- The product page. Open a product and fill in Country of origin and Harmonized System (HS) code in the Shipping section. Handy for a few products
- The bulk editor. In Products, check the products, click Bulk edit, click Columns, and add Harmonized system code and Country of origin from the Shipping section
- The customs information CSV. In Settings > Taxes and duties, export your customs information, fill in the HS Code and COO columns in a spreadsheet program, and import the file again. Shopify emails you the export, and emails again when the import is done
A Mixtable spreadsheet keeps the customs columns next to the rest of your product data, such as SKU, vendor, and product type, and adds what a big customs job needs:
- Filters that show only the variants with no HS code or no country of origin
- Copy and paste across thousands of variants, such as one code for a whole product type
- Imports matched by SKU from a supplier’s or customs broker’s file, changing only the columns you choose
- A preview of every change before it reaches Shopify, and a history of every change you sync
How to bulk edit HS codes and country of origin with a spreadsheet
Step 1: Create a spreadsheet with one row per variant
Customs details belong to variants, so you need a worksheet with one row per variant. If you don’t have one yet:
-
Install Mixtable Spreadsheet Editor from the Shopify App Store
-
Open your Mixtable dashboard and click Create spreadsheet at the top of the page. If you haven't created a spreadsheet yet, click Browse all templates below the dashboard's suggestions instead. In the Create spreadsheet window, find Full product information under Products, or type its name in the search box, and click it to preview it. Then click Create spreadsheet at the bottom of the window. Mixtable creates the spreadsheet and fills it with data from your Shopify store.
The template creates a Products (with variants) worksheet with your products’ titles, SKUs, options, prices, and stock. Any other Products (with variants) worksheet you already have works too.
Step 2: Add the customs columns
-
To load more Shopify data, click + Shopify data in the header row of an empty column, such as the one right after your last column. You can also choose Column > Add Shopify data… from the menu bar. The field picker opens and asks What should column E show?, with your column's letter in place of E. It lists everything the worksheet can show from Shopify, grouped into sections the way your Shopify admin groups them. Type in the search box at the top, or click a section on the left, to find the field you want.
-
Click Shipping on the left, or type HS or origin in the search box
-
Click HS code (customs), then click Save Column
-
Repeat for Country of origin, and for Province of origin if you need it
Each column shows the variant’s current value from Shopify. The cell is empty when the variant has none.
HS code (customs) is a text column, so leading zeros stay put. A code like 090121 (roasted coffee) never turns into 90121.
Step 3: Fill in the codes
Edit the cells the way you would in Excel:
- Type or paste a code into a cell to add or change it
- Paste a whole column from a supplier’s or customs broker’s file, as long as its rows are in the same order as your worksheet. If they aren’t, import the file instead
- Copy one cell and paste it into many. Select the cells you want to fill and paste: the value goes into every selected cell. When a filter is on, only the rows you can see change
- Clear a cell to remove the value from the variant
Edited cells turn pale yellow until you sync them.
Step 4: Preview and sync to Shopify
When you are ready, look at the sync control at the top right of the spreadsheet, next to Share. It shows how many edits are waiting, for example 12 unsynced changes. Click Sync now to open the Preview changes window and review them, then click Sync in the window. To send them at a set time instead, click Schedule sync. Mixtable sends the updated customs data to Shopify. It may take a few seconds for the changes to appear in your store.
Shopify checks each value as it saves it. If it refuses one, such as an HS code with only four digits or a country name typed out in full, the sync control shows a sync error that names the row and gives Shopify’s reason. Fix the value and sync again. Changes to your other products go through as usual.
Customs details you change in Shopify flow back into these columns automatically, so your spreadsheet stays up to date. You’ll also see a variant’s customs details in the Details panel, and every synced change in cell and row history.
Common customs jobs, step by step
Find variants that are missing an HS code or country of origin
- Click Filter in the toolbar
- Click the ▼ button in the HS code (customs) header (or Country of origin)
- Click Uncheck all, tick (Blanks), and click OK
Now the worksheet shows only the variants with no code. Fill them in, then click Filter again to see all your rows. The filter guide covers more ways to narrow down your list.
Give a whole product type the same HS code
Products of the same kind usually share an HS code. For example, all your cotton T-shirts might use 610910, whatever their size or color.
- Add a Product type or Category column if your worksheet doesn’t have one
- Filter the worksheet to that type, such as T-Shirts
- Type the code into the first visible HS code (customs) cell and copy it
- Select the rest of the visible HS code (customs) cells and paste
- Sync
Do the same for Country of origin when one supplier makes the whole range: filter by Vendor, then paste the country code.
Import codes from a supplier or customs broker file
When a supplier or customs broker sends a CSV file of HS codes or countries of origin by SKU, you don’t need to copy them row by row. With a SKU column and the customs columns in your worksheet:
- In the menu bar, click Import & Export > Import CSV file, and upload the file
- Match the CSV’s SKU column to your worksheet’s SKU column
- Let only the customs columns change, such as HS code (customs) and Country of origin
- Run the import, check the yellow cells, and sync
The Import CSV file guide covers every option in the importer.
Use Shopify’s default country of origin
If most of your products are made in one country, you don’t have to type that country on every variant. In your Shopify admin, go to Settings > Taxes and duties > Customs information and set a default country of origin. Shopify uses it for any product without its own country of origin. Then use the Country of origin column only for the products made somewhere else.
Export HS codes and country of origin to Excel or CSV
Customs brokers, 3PL warehouses, and marketplaces often ask for a list of your products with their HS codes and countries of origin. To make one:
- Add the customs columns you need, as in Step 2, plus anything else they ask for, such as SKU, Product title, Weight, or Cost per item
- If the sync control at the top right shows updates waiting from Shopify, for example Apply 3 updates, click it first so your file includes them
- Click Import & Export in the menu bar and choose Export to Excel or Export to CSV
The Excel file stores HS codes as text, so leading zeros stay put. The CSV file keeps them too, but Excel drops them if you open a CSV by double-clicking it, so use the Excel file when you’ll work in Excel.
Exporting is free with Mixtable Export: Excel & CSV, so you can pull a customs report without editing anything. Export Shopify products covers the export in more detail.
Things to know
- Customs columns are on variant worksheets. They’re available on Products (with variants) worksheets, where each row is a variant, so variants of one product can have different codes
- Shopify checks values when you sync. Mixtable sends each value as you typed it, and Shopify’s error tells you about any it refuses
- Finding the right code. Look up each product’s HS code in your country’s tariff lookup, or ask your customs broker
Frequently asked questions
What is an HS code? The Harmonized System code is a number customs offices around the world use to classify goods. The first six digits are the same in every country, and some countries add more digits for their own tariffs. Customs uses the code, together with the country of origin, to work out duties and taxes.
Do I need HS codes if I only ship within my own country? Usually not. Shopify asks for them on international shipments, where they go on the customs form and shipping label.
Can I set HS codes for many products at once in Shopify? Yes. Shopify’s bulk editor and its CSV import both handle them. A Mixtable spreadsheet adds filters, copy and paste across thousands of variants, imports matched by SKU, and a preview of every change before it reaches your store.
Should I type the HS code with dots? No. Shopify accepts digits only, from 6 to 13 of them. Type 6109.10 as 610910.
What do I type in the Country of origin column? The country’s two-letter code, such as CN for China, IT for Italy, or US for the United States. Shopify refuses country names written out in full.
Will my leading zeros survive? Yes. HS code (customs) is a text column, so Mixtable keeps every digit, and Excel exports store the codes as text too.



