How to Clean a CSV for WooCommerce Import — Fix Before Upload
Table of Contents
WooCommerce's CSV importer is strict. A product import that looks right in Excel can fail because of trailing spaces in product names, duplicate SKUs, or inconsistent email capitalization in a customer export. The importer does not always tell you which row caused the problem — it aborts and you start over.
The free CSV Data Sanitizer handles the common formatting issues before you attempt the import. Browser-based, no upload to any server, works on product CSVs and customer CSVs alike.
Common WooCommerce CSV Import Failures
WooCommerce has a built-in CSV importer for products (and an extension-based importer for customers and orders). Here are the formatting issues that cause the most import failures and headaches:
Product imports:
- Trailing spaces in names or SKUs — WooCommerce may treat "Red T-Shirt " (with a trailing space) as a different product from "Red T-Shirt", creating a duplicate instead of updating the existing product
- Duplicate SKUs — if your CSV has the same SKU twice (from merging two exports), WooCommerce will create or update both, resulting in duplicate products
- Inconsistent category/tag capitalization — "T-Shirts" and "t-shirts" may create separate categories depending on your WooCommerce configuration
- Empty rows — an empty row in the product CSV causes the importer to fail on that row or stop entirely
Customer exports/imports:
- Trailing spaces in email addresses — prevents matching against existing customer records on re-import
- Mixed-case emails — if you are importing a cleaned customer list back, WooCommerce deduplicates on exact email match by default
- Duplicate customer rows — merged customer exports often have the same customer twice with slightly different data
What the CSV Sanitizer Fixes for WooCommerce CSVs
The tool applies up to six fixes, each independently toggleable. For WooCommerce specifically:
Trim whitespace (all cells) — removes leading and trailing spaces from every cell including product names, SKUs, category names, and email addresses. This is the most important fix for WooCommerce imports. Enable this for every product and customer CSV.
Remove empty rows — strips blank rows from the CSV. WooCommerce's importer can choke on blank rows or skip rows that follow a blank line.
Remove duplicate rows — removes exact duplicate records (same data in every column). For product CSVs built by merging multiple exports, this prevents duplicate product creation.
Lowercase emails — auto-detects columns with "email" in the header and lowercases all values. Useful for customer import CSVs where email is the dedup key.
Capitalize names — applies Title Case to columns with "name" in the header. Useful for product names and vendor/brand columns. Note: this applies to all name-detected columns, so check the preview to confirm it does what you expect.
Format phone numbers — standardizes US numbers in columns with "phone", "tel", "mobile", or "cell" in the header to (xxx) xxx-xxxx format. Useful for customer CSVs with billing phone numbers.
Sell Custom Apparel — We Handle Printing & Free ShippingStep-by-Step: Clean Your WooCommerce CSV Before Import
- Export your CSV from your source system (another WooCommerce store, a spreadsheet, a previous migration tool)
- Open the CSV Sanitizer at the tool page
- Upload your file — drag and drop or click to browse. Your file is processed locally and never leaves your browser.
- Choose your fixes:
- For product CSVs: enable trim whitespace, remove empty rows, remove duplicates. Consider capitalize names for the product name column. Disable the email and phone fixes unless your product CSV has those columns.
- For customer CSVs: enable all fixes — trim whitespace, lowercase emails, format phones, remove empty rows, remove duplicates, capitalize names for first/last name columns.
- Click Clean CSV and review the stats panel — confirm the counts look reasonable
- Preview 10 rows using the built-in preview to spot-check the output
- Download the cleaned CSV
- Import to WooCommerce using the built-in importer (Products > Import) or your preferred migration plugin
What the Sanitizer Does Not Fix for WooCommerce
The CSV Sanitizer fixes formatting problems, not structural or content problems. For WooCommerce imports, these issues require a different solution:
- Wrong column headers — WooCommerce's importer expects specific column names (like "SKU", "Name", "Regular price"). If your CSV uses different headers, use the CSV Column Mapper to rename them before import.
- Wrong data format for specific fields — WooCommerce expects specific formats for some fields (pipe-separated category hierarchies, specific date formats, comma-separated tags). The sanitizer does not reformat these fields.
- Missing required fields — if your CSV is missing a required column like SKU or Name, the sanitizer cannot add it. You need to add the column manually.
- Image URLs — if your image column has broken or relative URLs, those need to be fixed at the source.
- Encoding issues — if your CSV has garbled special characters from an encoding mismatch, those need to be fixed with an encoding converter before running the sanitizer.
Think of the sanitizer as the first step in the import prep process, not the only step.
After Cleaning — Final Checks Before Import
Before uploading the cleaned CSV to WooCommerce:
- Open the preview in WooCommerce's importer — the importer shows you a column mapping screen before committing. Verify that each column is mapped to the correct WooCommerce field.
- Check the row count — compare the row count in the cleaned CSV against your expected number of products or customers. A significant difference may indicate unintended duplicate removal or filtering.
- Test with a small batch — if you are importing thousands of products, run a test import with the first 10-20 rows to confirm the mapping is correct before doing the full import.
- Back up your existing data — export your current WooCommerce products or customers before importing, so you can restore if the import produces unexpected results.
For Shopify imports (if you are migrating between platforms), see the Shopify CSV Cleaner guide — the Shopify importer has different column name requirements and some different formatting expectations.
Try It Free — No Signup Required
Runs 100% in your browser. No data is collected, stored, or sent anywhere.
Open Free CSV SanitizerFrequently Asked Questions
Does this work for variable product CSVs with parent-child rows?
Yes, with a caveat. The sanitizer processes all rows uniformly. The parent-child relationship in WooCommerce variable product CSVs is maintained by the Type column (simple, variable, variation) and the parent SKU. The sanitizer does not touch these relationships — it only cleans formatting within cells. Trim whitespace and remove empty rows are safe for variable product CSVs.
My WooCommerce import says "1 item failed to import" with no detail. What do I check?
Most single-row failures are caused by: (1) a trailing space in the SKU field making WooCommerce think it is a new product instead of an update, (2) a duplicate SKU in the CSV, or (3) a required field (like Name) that is empty for that row. Run the sanitizer with trim whitespace and remove empty rows enabled, then retry the import.
Can I use this for WooCommerce order CSVs?
Yes. Order export/import CSVs (typically used with migration plugins) benefit from the same formatting fixes — trim whitespace, lowercase emails, remove empty rows. The sanitizer does not know or care whether the CSV contains products, customers, or orders; it applies the selected fixes to every row.

