Duplicate SKUs in a product CSV: find and fix
Two or more rows in your product CSV share the same SKU. A store import may reject them, merge them, or let one row overwrite the other. You often do not see which one won.
Why it happens. The same product was added twice. Two exports were pasted into one file. A variant was copied and its SKU was not changed. Or the same code was typed in two ways, such as "ab-1" and "AB-1", or with a stray space at one end.
Find them by hand, on a copy of the file. 1. Clean first, then sort. Before sorting, look for spaces at the start or end of SKU cells: a hidden space makes two identical-looking codes different (see "Hidden spaces in a product CSV: find and fix them"). Also check case: find out whether your store counts "ab-1" and "AB-1" as the same SKU; if it does, they are duplicates, so make them one style first. Now select the whole table, every column and every row, and only then sort by the SKU column. Do not sort with only the SKU column selected: it would separate from its rows, and prices and titles would end up on the wrong SKUs.
2. Scroll down the sorted SKU column; identical values sit next to each other. 3. In a spare column, mark each group of matching rows, for example "A" for the first group and "B" for the second. If a SKU such as 00123 shows as 123, see "Why SKUs lose leading zeros in CSV files".
Which row stays. Compare the rows in each group. If the rows are identical, keep one and delete the rest. If they differ, keep the row with the current price, stock and title; if you cannot tell which is current, check your source system, and do not decide by row position alone. If they are truly different products, do not delete anything: give each its own unique SKU. For a worked before-and-after example of that last case, see "Duplicate SKU: what should I change?".
Check. Sort again and confirm that no two neighbouring rows share a SKU, using your store's rule for case. Confirm the row count equals the original count minus the rows you removed. Spot-check a few prices and titles against your untouched copy.
The free CSV check flags duplicate SKUs in the first 20 data rows of a file. It ignores spaces at the ends of a SKU but treats "ab-1" and "AB-1" as different, so check case yourself, and check the rest of a longer file by hand.
Note: these manual steps have not been tried on a real table.
Check your CSV on heloft.com (yeni sekmede açılır)
Rakamların kaynağı
- HQ CEO chain draft, 26 September 2026 (run 5d6bdcaf), accepted by a separate quality agent; manual steps not tried on a real table
- Free CSV check behaviour (heloft.com/m01): duplicate SKUs are flagged in the first 20 data rows after trimming edge spaces; case is compared exactly