“Missing or stray quote on line”: fixing unclosed quotes in a Shopify CSV
A value on the reported line opens a double quote that never closes, or contains a quote the CSV parser can’t place. Supplier product names with inch marks and quotes copied from Word are the usual culprits.
Missing or stray quote on line 5What the message means
Shopify reads a double quote at the start of a value as “this value continues until the next closing quote”. If that closing quote never comes, or a quote appears in the middle of an unquoted value, the parser can’t tell where the value ends. Shopify’s help center attributes the error to smart quotes from Excel or extra quote marks.
Typical examples
| What’s in the cell | Why it fails | Write it as |
|---|---|---|
6" Ceramic Planter | A quote in the middle of a value that isn’t wrapped in quotes. | "6"" Ceramic Planter" or 6 in Ceramic Planter |
"Summer" Tote | The quote closes after “Summer” and text follows it. | """Summer"" Tote" |
“Best seller” mug | Curly quotes pasted from another app. | Best seller mug |
Notice how a value containing quotes is itself wrapped in quotes, with each inner quote doubled. That is the CSV standard Shopify expects.
How to fix it
- Open the file in a text editor and go to the reported line. If the line looks fine, check the line above it: an unclosed quote on one line swallows the next line too.
- Search the whole file for
",“and”and check each hit. - Replace inch marks with
inwhere possible, or wrap the value in quotes and double the inch mark. - Replace curly quotes with straight quotes or remove them.
- Save as CSV UTF-8 and import again. Run the file through the free Shopify CSV checker before you import again.
Prevent it next time
Don’t type or paste quotes into cells meant for CSV export, and let your spreadsheet program write the file. When you paste product names from a supplier PDF, paste as plain text and clean up measurements first. Sheet2Store writes quoting automatically when it converts a supplier PDF to a Shopify CSV, so product names with inch marks stay valid.
Frequently asked questions
Why is the line number off by one?
A quote that never closes makes the parser read into the next line, so the error can be reported on the line after the real problem.
Excel shows no quotes at all. Where are they?
Excel hides the quoting characters it uses in the file. A text editor shows what Shopify actually receives.
Will my titles change if I replace inch marks with “in”?
Only in wording. If you want the symbol in your store, keep it and wrap the whole value in double quotes, doubling the inch mark.
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.