Import products with a CSV file in Shopify
A CSV file is how a whole batch of products enters the store at once, instead of one product page at a time. This tutorial imports 3 products with 9 variants between them, and checks the file against the rules before uploading, so the import does not fail halfway.
Written · Shopify admin, desktop steps · 6 minutes read
The worked example
| Products imported | 3 |
| Variants imported | 9 |
| Required column for new products | Title |
| Also required with variants | URL handle |
| Rows checked | 9 |
Download the record: product-import-file.csv (492 bytes).
A product import record: the 3 products and 9 variant rows in the file, with the title, handle, option, SKU, and price columns. This is the record of the file, kept beside the import.
1Start from the sample file
Download the sample product CSV file from the help page and use it as a template. The sample holds two example products with variants: remove the example products before you write your own rows, or they will be imported too.
2Write one row per variant
Write the file with one row for each variant: 3 rows for the Trail Crew Tee in its 3 sizes, 3 rows for the Summit Hoodie, and 3 rows for the Trail Cap. That is 9 rows for 3 products.
3Fill the required columns
For new products, the only required column is Title. Because these products have variants, the URL handle column is also required on every row.
4Fill the variant columns
On each row, fill Option 1 name and Option 1 value with the size, plus SKU, Price, and Variant inventory quantity where they apply. If you update a variant column such as SKU, the Option 1 name and value columns must be there too.
5Check the first line
Check that the first line of the file holds the column headers exactly as the product CSV table lists them, and that each column is separated by a comma. A header spelled differently is the most common reason an import fails.
6Import the file
From your Shopify admin, go to Products, click Import, and upload the file. Review the import summary before it runs, and check the product list afterwards for the 3 new products.
The arithmetic
| Figure | Number |
|---|---|
| Products in the file | 3 |
| Variants in the file | 9 |
| Rows in the file | 9 |
| Rows per product | 3 |
Three products with 3 variants each is 9 rows, and the file holds 9 rows. Each product has the same 3 rows, so a missing row would show up as a short count before the import starts.
Held at the counter
The sample file imports its examples too. If you use the sample file as a template and forget to remove its example products, they are imported into your store as live listings. Clear the sample rows first.
A missing URL handle breaks variant rows. Title alone is enough for a product with no variants, but a variant row also needs its URL handle. Without it, Shopify cannot tell which product the variant belongs to.
Blank variant columns can wipe saved data. When you update products by CSV file, a blank cell in some columns overwrites the saved value. Omit a column you do not mean to change, instead of leaving it blank on every row.
Sources
- Using CSV files to import and export products — Shopify's help pages: the required Title and URL handle columns, the first line header rule, the sample file, and the variant column dependencies.