“Unquoted fields do not allow \r or \n”: fixing line breaks in a Shopify CSV
A value on the reported line contains a line break but isn’t wrapped in double quotes, or the whole file uses line endings Shopify’s parser doesn’t expect. Multi-line product descriptions are the most common cause.
Unquoted fields do not allow \r or \n (line 2).What the message means
\r and \n are the invisible characters that end a line. In a CSV file a line break normally means “next row”. A line break is allowed inside a value only when that value is wrapped in double quotes. When Shopify finds a break inside an unquoted value, it can’t tell whether a new row has started, so it stops.
Common causes
- Multi-line descriptions typed with Alt+Enter in Excel or pasted from a supplier document, then saved by a tool that didn’t quote them.
- A file saved with old Mac line endings (a lone
\r), for example from “CSV (Macintosh)” in some Excel versions or from other software that writes classic Mac line endings. - A file edited by hand in which a description was split over several lines.
Broken:
Title,URL handle,Description,Price
Waffle Towel,waffle-towel,100% cotton
320 gsm,18.00Fixed, with the multi-line value quoted:
Title,URL handle,Description,Price
Waffle Towel,waffle-towel,"100% cotton
320 gsm",18.00Even better for Shopify, which renders descriptions as HTML: replace the line break with <br> or use paragraphs, as in <p>100% cotton</p><p>320 gsm</p>.
How to fix it
- Open the file in Excel or Google Sheets and look at the description column around the reported line for cells with several lines.
- Either remove the line breaks (Find and Replace, searching for a line break with Ctrl+J in Excel for Windows) or replace them with
<br>. - Save again as CSV UTF-8 (Comma delimited), which quotes multi-line values correctly.
- If the error mentions line 1 or every line, the problem is the file’s line endings. Re-save it from Google Sheets or as CSV UTF-8 in current Excel, or convert line endings to Windows (CRLF) or Unix (LF) in a text editor.
Prevent it next time
Keep descriptions on a single line inside the spreadsheet and use HTML tags for formatting. When you generate a CSV from a supplier catalog with Sheet2Store, line breaks in descriptions are converted to <br> tags and every value is quoted where needed.
Frequently asked questions
Why does the error say line 1?
If the file uses a line-ending style the parser doesn’t expect, the whole file looks like one long line. Re-save it as CSV UTF-8 or change the line endings in a text editor.
Are line breaks allowed in Shopify descriptions?
Yes, inside a quoted value. Because the Description column accepts HTML, using <br> or <p> tags is the more reliable way to format text.
Can the free checker find this problem?
Not as this exact message. The checker reads line breaks the way spreadsheet programs do, so an unquoted break shows up as a broken row, such as a row without a title or price. Fix the line breaks first.
Turn a supplier file into an import-ready CSV
Upload a supplier PDF, Excel or CSV price list. Map the columns, set your markup, fix flagged rows and download a Shopify or WooCommerce CSV. The first five rows are free to preview.