You upload a product CSV to Shopify and get Illegal quoting on line 2, Invalid CSV header: missing headers, or an import that “works” but leaves é and other strange characters in your product descriptions. These errors are about the CSV file itself, not your products, and they’re usually quick to fix once you know what Shopify is checking.
Short answer: the file must be UTF-8, use straight double quotes, wrap any value that contains commas, quotes or line breaks in quotes (with inner quotes doubled), and have a header row that matches Shopify’s template exactly.
The errors, one by one
“Illegal quoting on line N” / “Missing or stray quote on line N”
Shopify’s parser found a quote character where a CSV can’t have one. Shopify lists three causes in its help center: the file isn’t UTF-8, a quote is missing or stray, or a spreadsheet app replaced straight quotes with curly (“smart”) quotes. The most common case in practice is the Body (HTML) column: HTML like <p class="note"> or a size like 55" contains quotes, and inside a quoted CSV value every quote must be doubled:
Wrong: my-tv,TV,"<p class="note">55" screen</p>"
Right: my-tv,TV,"<p class=""note"">55"" screen</p>"How to fix it:
- Open the file in a text editor (not Excel) and go to the line in the error. The real problem is on that line or the one before it.
- Replace curly quotes (
“ ”) used around values with straight ones ("), and double every quote inside a quoted value. - Or let a spreadsheet do the quoting: import the file into Google Sheets, check the broken rows, and use File → Download → Comma-separated values. Google Sheets writes valid quoting and UTF-8.
“Invalid CSV header: missing headers” (e.g. “Missing headers: Title”)
The first line must match Shopify’s product template exactly, including capitalization (Handle, not handle). Things that break it even when the names look right:
- Extra spaces at the end of the header line (Shopify calls this out specifically).
- A byte order mark (BOM) at the start of the file, which some tools read as part of the first column name.
- The wrong delimiter: a file saved with semicolons by a European version of Excel is read as one giant column. See comma vs semicolon.
- An illegal-quoting problem on line 1 or 2, which often shows up together with this error.
If Shopify shows a Choose column headings window during import, your headers don’t match; pick the right one for each column there, or fix them in the file.
“Network error: Unexpected token < in JSON at position 0”
Despite the wording, Shopify documents this as a header problem too: column titles that don’t exactly match the template. Compare your header row with the sample CSV character by character.
Strange characters after the import (é, ’, �)
The file wasn’t saved as UTF-8, which Shopify requires. Excel’s plain CSV (Comma delimited) format uses an older Windows encoding. Save with CSV UTF-8 (Comma delimited) instead, or follow the CSV encoding guide. Products that were already imported with broken characters need to be fixed or re-imported, because the import can’t be undone.
“Ignored line … because it did not contain product data” or “… handle already exists”
These are content errors, not file errors: a row has a handle but no title, or two different products use the same handle. Rows for extra variants and images of the same product should repeat the handle and leave product-level columns empty; a new product needs a new, unique handle.
Other limits worth knowing
- The product CSV can’t be larger than 15 MB. Split bigger files and import them one at a time.
- Don’t sort an exported product CSV in Excel or Numbers: Shopify warns it can break the link between products and their image rows.
- With Overwrite products with matching handles, an empty optional column overwrites the existing value with blank.
- Back up your products first. A running import can’t be cancelled.
Check the file before you upload it
CSVCheck catches the file-level problems behind most of these errors before Shopify does: encoding that isn’t UTF-8, a BOM, stray or unclosed quotes with their line numbers, rows with the wrong number of columns, duplicate or empty headers and the delimiter in use. It doesn’t check Shopify-specific rules like handles, prices or variant options. It runs in your browser, so your product data isn’t uploaded anywhere.
Sources: Shopify Help Center, Solutions to common product CSV import problems and Importing products with a CSV file.