ShopifyGuide

Fix duplicate variant combinations in a Shopify CSV

In a Shopify product CSV, one product spans several rows that share the same Handle: the first row holds the product details, the next rows hold its variants. Each variant must have a unique combination of option values. Two rows with Size = M, or a variant row with no option value at all, make the import fail for that product.

Why it happens

  • A supplier file lists the same size twice with different SKUs (a restock, a colour lost in a merge).
  • Option2 (colour, material) was dropped when columns were cleaned up, so "M / Black" and "M / White" both became "M".
  • A variant row was added by hand without filling Option1 Value.

Broken example

Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price
classic-tee,Classic Tee,Size,S,TEE-S,19.90
classic-tee,,,M,TEE-M-BLK,19.90
classic-tee,,,M,TEE-M-WHT,19.90
classic-tee,,,,TEE-L,19.90

Corrected file

Handle,Title,Option1 Name,Option1 Value,Option2 Name,Option2 Value,Variant SKU,Variant Price
classic-tee,Classic Tee,Size,S,Color,Black,TEE-S,19.90
classic-tee,,,M,,Black,TEE-M-BLK,19.90
classic-tee,,,M,,White,TEE-M-WHT,19.90
classic-tee,,,L,,Black,TEE-L,19.90

Check your own file in seconds

The fixer groups rows by Handle, flags every repeated option combination and every variant with a missing option value, and shows the exact rows. Resolving them is a business decision (new option or real duplicate?), so it is left to you.

How to fix it

  1. Never "deduplicate" rows by Handle: rows sharing a Handle are the variants of one product.
  2. For each product, list the option values of every variant; each combination must appear once.
  3. If two rows differ by a real attribute (colour, material), add it as Option2 Name / Option2 Value — the name goes on the first row only.
  4. If they are a true duplicate, keep one row and delete the other; fill any empty Option1 Value.

Shopify documents the expected format in its common product import issues page. Checking is free and your file never leaves your browser; applying fixes and downloading the corrected file take CSV Viewer Pro or a one-time 2,99€ 24-hour pass.

Other Shopify CSV problems