CSV Quoted Commas and Double Quotes
A comma is data only inside a quoted CSV field, and a literal double quote inside that field is written twice.
Open CSV Checker & FixerQuote any field that contains a delimiter, quote, or line break. Within a quoted field, write each literal quote as two quotes. Validate the parsed field count before changing a file: a visual line can be misleading.
Treat quoting as syntax
CSV uses commas to separate fields, so an unquoted comma starts another field. Enclosing the whole value in double quotes makes that comma data instead. A doubled double quote represents one literal quote inside that quoted value.
Do not use a global find-and-replace to add quotes. It can change correct fields and cannot determine whether a comma is a separator or text without parsing the record.
Check parsed records, not screen lines
A quoted cell may include a newline. A quote-aware parser stays in quote state until it reads the matching closing quote, then ends the logical record only at an outside newline.
When an import fails, locate the earliest quote-state or field-width error and compare it with the original export. Later rows may be a cascade from one missing or undoubled quote.
Broken and corrected examples
Comma in an address
id,address
1,12 King St, Londonid,address
1,"12 King St, London"Quotes keep the address as one field.
Literal quote in a note
id,note
2,"Say "yes""id,note
2,"Say ""yes"""Each literal quote is doubled.
How to fix it safely
- Keep the original export.
- Run CSV Checker & Fixer and inspect quote-state and record-width diagnostics.
- Repair the earliest confirmed broken field from the source data.
- Download a new copy and confirm the logical-record count and columns.
Common questions and edge cases
Must every field be quoted?
No. Quote fields that need it, or quote every field consistently if the receiver accepts that dialect.
Can a comma be escaped with a backslash?
Not in common RFC 4180-style CSV; use enclosing quotes.