Clean Product CSVs for Shopify & WooCommerce
Fix encoding, SKUs, quotes, images, and variants in e-commerce product CSVs before you import them into Shopify or WooCommerce, step by step.
I’ve spent far too many afternoons debugging product imports that choked on row 847. Worse is an import that claims it succeeded, only to realize it duplicated half your catalog or wiped out live inventory levels. Both are almost always data format issues rather than store platform bugs, and you can catch every one of them before uploading anything.
Here is the exact cleaning workflow I use when prepping product CSVs for Shopify or WooCommerce: what breaks, why importers reject files, and how to fix each issue quickly. Import rules occasionally change, so it’s a good idea to keep the platforms’ official docs handy as well: Shopify’s common import problems and WooCommerce’s product CSV importer guide.
Start from the platform’s own format
Before you edit anything, do these three things:
- Export your current products. In Shopify, use Products > Export. In WooCommerce, use Products > All Products > Export. That gives you a backup and a file in exactly the format the importer expects.
- Copy the header names from that export or the platform’s sample file. Don’t retype them. Shopify shows a “Choose column headings” screen when your headers don’t match, and WooCommerce shows a Column Mapping screen and does not import unrecognized columns by default.
- Never work on your only copy.
Here is how the two platforms differ on the points that matter most for cleaning:
| Shopify | WooCommerce | |
|---|---|---|
| Encoding | UTF-8 | UTF-8 |
| What identifies a product | The Handle column | The SKU or the ID |
| Variants | Extra rows with the same Handle | Variation rows linked through the Parent column |
| Extra images | Extra rows with Image Src and Image Position | Several URLs in one Images cell, separated by commas |
| Mapping screen | “Choose column headings” | Column Mapping |
| Updating existing products | “Overwrite existing products with matching handles” | “Update existing products” |
Ten problems that break product CSVs
1. Wrong encoding
Both platforms expect UTF-8. If descriptions show characters like é instead of é, the file is almost certainly not UTF-8. Be careful with error messages, too. Shopify’s help page says the “Daily variant creation limit reached” error can actually be caused by an illegal character in the file, or by a missing or stray quote.
To fix it, save as UTF-8. In Excel, choose “CSV UTF-8 (Comma delimited)”. In Google Sheets, use File > Download > Comma-separated values. In LibreOffice Calc, save as CSV and set the character set to UTF-8. Then reopen the saved file and check that accented characters look right.
2. Excel changes SKUs, barcodes, and other identifiers
SKUs, barcodes (UPC, EAN, GTIN), and product codes are text, not numbers. When Excel opens a CSV by double-click, it guesses. Leading zeros disappear, so 00417 becomes 417, and long digit strings turn into scientific notation such as 8.71E+12. Once you save the file, the original values are gone.
Don’t double-click the CSV. Use Data > From Text/CSV and set those columns to Text before loading (menu names vary by Excel version), or format the column as Text before you paste values in. To check what a file really contains, open it in a plain-text editor or a CSV viewer instead of Excel.
3. Commas, quotes, and line breaks inside descriptions
Product descriptions contain HTML, commas, quotation marks, and often line breaks. Every one of those fields must be wrapped in quotes, with inner quotes doubled. Otherwise the row breaks and every column to its right shifts. Shopify lists missing or stray quotes as a cause of failed imports. Our guide on fixing comma and newline errors in CSV fields shows how to find the broken row. A cell that holds a huge block of text in a viewer usually means a closing quote is missing right before it.
4. Duplicate or mismatched handles, SKUs, and options
Shopify groups rows by Handle. Rows with the same handle are variants and extra images of one product, so a typo in one row creates a separate product. Shopify also reports an error when a product has duplicate options, for example two variants with the same option values. In WooCommerce, check that each variation has a unique SKU and that its Parent value matches the parent product’s SKU or ID.
Sort by Handle and SKU and scan them. In Excel, Conditional Formatting > Highlight Cells Rules > Duplicate Values marks repeats. The script later in this guide also reports duplicate SKUs.
5. Inconsistent option names and values
“Size” and “Sizes”, “M” and “Medium”, “Black” and “black” create messy products and duplicate options. Pick one spelling and one capitalization for each option and apply it to every row of the product. A pivot table, or a filter on each option column, shows you the distinct values quickly.
6. Messy prices and numbers
Price columns should hold plain numbers: no currency symbols, no spaces, no thousands separators, and the same decimal separator everywhere. A value like 1.299,00 can be read as 1.299 or rejected. Convert regional formats before importing. While you are there, check stock columns for text such as “N/A”, and for negative or decimal quantities.
7. Blank rows, stray spaces, and hidden characters
Empty rows at the bottom of the file, spaces at the start or end of a SKU, and non-breaking spaces copied from web pages cause blank-handle errors, failed matches, and “duplicates” that look identical on screen. In Excel, this formula cleans a cell:
=TRIM(SUBSTITUTE(A2,CHAR(160)," "))
It replaces non-breaking spaces and trims ordinary ones. Delete completely empty rows afterwards.
8. Broken or unsuitable image URLs
Both platforms fetch images from the URLs in your CSV, so each URL must point directly to an image file that anyone can open, not to a web page that displays the image and not to a link behind a login. Use https, avoid spaces in URLs, and check the file extension.
The two platforms handle several images differently. In Shopify, extra images go on extra rows with the same Handle, using Image Src and Image Position. In WooCommerce, you put several URLs in one Images cell, separated by commas, so the cell must be quoted. Very large images can fail, too: Shopify’s help page mentions an image size limit of 5000 x 5000 pixels. WooCommerce’s core importer can’t add or update image alt text, so plan to set it separately.
9. Categories, tags, and other lists
In WooCommerce, multiple values in one field are separated by commas. A category whose name contains a comma has to be escaped with a backslash, which WooCommerce’s documentation shows with a “Places, People, Cities” example. WooCommerce also expects 1 for true and 0 for false in Boolean columns, and dates in your store’s time zone. In Shopify, tags sit in one cell separated by commas, so that cell has to be quoted. In both, keep the spelling of every category and tag identical from row to row, or you will create near-duplicates.
10. File size, limits, and overwrite surprises
Shopify limits the size of an import file (commonly cited as 15 MB) and, on plans other than Plus, how many new variants you can create per day. Check the current numbers in Shopify’s documentation. If you have to split a file, split by whole products, so that every row with the same Handle stays in the same file.
Updating existing products carries its own risk. Shopify’s “Overwrite existing products with matching handles” and WooCommerce’s “Update existing products” both replace data for products that match. If your file contains inventory columns, you can overwrite live stock levels, and re-importing an edited export can change or remove data you didn’t mean to touch. Always test with a few products first.
A cleanup workflow you can repeat
- Back up. Export your current products and keep that file untouched.
- Inspect the raw file. Open the new CSV in a text editor or the CSV viewer and check the encoding, the number of columns on every row, and any cell with a huge block of text.
- Merge supplier files. If products come from several suppliers, rename their columns so equivalent columns have identical names first. Then merge the CSV files. RealCSVTools matches columns by header name, so mismatched names would end up in separate columns. Check the result before moving on.
- Clean the data. Fix SKUs, prices, options, duplicates, and image URLs directly in the CSV editor or with a script.
- Save as UTF-8 CSV. Use a UTF-8 CSV option, because spreadsheet programs can change the encoding when they save.
- Re-check in a viewer. Confirm the row count, the column count, and that SKUs and barcodes kept their leading zeros.
- Test import. Import 5 to 10 products first and look at them in the store.
- Full import. Run it, spot-check products, variants, images, and stock, and keep the backup.
If your cleanup is happening in Excel, Excel to CSV covers the saving step, and CSV to Excel covers opening a file as a proper spreadsheet. You can also use the online CSV editor to edit individual cells directly in your browser without altering leading zeros.
A starter script for the checks
For large catalogs, a short script is faster than scanning by eye. This one trims text, drops empty rows, and reports duplicate SKUs, using Shopify’s column names. Change them if your file differs:
import pandas as pd
df = pd.read_csv("supplier.csv", dtype=str, keep_default_na=False)
df.columns = df.columns.str.strip()
for col in df.columns:
df[col] = df[col].str.replace("\u00a0", " ", regex=False).str.strip()
df = df[(df != "").any(axis=1)] # drop completely empty rows
dupes = df[(df["Variant SKU"] != "") & df.duplicated("Variant SKU", keep=False)]
print(dupes[["Handle", "Variant SKU"]])
df.to_csv("clean.csv", index=False, encoding="utf-8")
The dtype=str argument is what keeps leading zeros intact. Run it on a copy, open clean.csv in a viewer, and compare it with the original before you import.
A note on supplier data
Product data is rarely private, but supplier price lists and cost columns often are. Before you upload a file like that to a free online tool, read why you shouldn’t upload sensitive CSVs to cloud converters, and prefer tools that process the file on your device.
Frequently asked questions
Why does Shopify say “Daily variant creation limit reached” on my CSV?
Shopify’s help page says this message can be caused by an illegal character in the file, so make sure it is saved as UTF-8, or by a missing or stray quote. Check both first. Non-Plus stores also have a real limit on new variants created per day, so confirm your current limit in Shopify’s docs.
How do I stop Excel from removing leading zeros in SKUs and barcodes?
Don’t double-click the CSV. Use Data > From Text/CSV and set the SKU and barcode columns to Text before loading, or format the column as Text before pasting values. Once a file is saved with the zeros removed, the original values can’t be recovered from it.
Can I upload a WooCommerce product CSV to Shopify as it is?
Not reliably. The two platforms use different column names and structures for variants and images. Export from the source store, then rename and restructure the columns to match the destination’s sample file, or use a migration tool, and test the result with a few products first.
Which encoding should a product CSV use?
Use UTF-8 for both Shopify and WooCommerce. Spreadsheet programs can change the encoding when they save a file, so choose a UTF-8 CSV option, such as “CSV UTF-8 (Comma delimited)” in Excel, and check that accented characters look right before importing.
How do I test a product import safely?
Back up your current products by exporting them, then import a small file of 5 to 10 products first, ideally into a staging or test store. Check titles, variants, prices, stock, and images on the product pages. Only then run the full import.