How to create a Shopify product CSV with variants
5 min read
Importing products by CSV is the fastest way to add many variants to Shopify — if the file is structured correctly. Here is how the format works and how to avoid the errors that stop imports.
How Shopify structures variants in a CSV
In a Shopify product CSV, every variant is its own row. Rows that share the same URL handle belong to the same product.
The first row of a product carries the product details, such as the title. The rows that follow only need the handle and the details that change from one variant to the next: option values, SKU and price.
The columns that matter for variants
- URL handle — the product’s unique identifier in the file. Every row of the same product uses the same handle.
- Title — required on the first row of each new product.
- Option1 name and Option1 value — for example Size and M. Option2 and Option3 work the same way.
- SKU — the stock code for that variant.
- Price — the variant’s price, as a number.
Shopify renamed several columns in its current template. Older files use Handle, Option1 Name, Variant SKU and Variant Price. Shopify still accepts the older names, so files in either style import correctly.
Limits to keep in mind
- A product can have up to three options.
- A product can have up to 2,048 variants.
- The file must be saved in UTF-8, otherwise accented characters can break.
Mistakes that make imports fail
- Option names that change between rows of the same product, such as Size on one row and Sizes on another.
- Option values missing on some rows.
- Two rows with the same combination of option values.
- The same SKU used on more than one variant.
- Currency symbols or text in the price column.
A faster way to build the file
Building this file by hand means repeating the handle, keeping option names identical and writing a SKU and a price on every row. For 3 colors and 4 sizes that is 12 rows. Add a material and it is 24.
VariantFlow generates every row from your options, applies a SKU pattern and pricing rules, checks the result and exports the CSV. The Free plan covers up to 50 variants per export.