Learn how CSV works, and the quoting rule that keeps commas inside a value from breaking the whole row.
CSV is one of the simplest data formats there is, rows of data separated by commas, but that simplicity hides a genuine gotcha: what happens when the data itself contains a comma?
CSV (Comma-Separated Values) represents tabular data as plain text: each line is a row, and commas separate the values within that row. The first row commonly holds column headers. It’s widely supported by spreadsheet software, databases, and countless other tools, making it a common export and import format.
name,city,age
John,London,30
Priya,Mumbai,27
What happens when a value itself contains a comma? Written naively, it would break the row into the wrong number of columns. The standard solution is to wrap that specific value in double quotes:
name,city,age
"Smith, John",New York,45
The quotes tell a CSV parser that the comma inside “Smith, John” is part of the data, not a column separator.
If a value contains a literal double quote character, it’s typically escaped by doubling it ("") inside the quoted field, another detail that trips up hand-written CSV.
The CSV to JSON Converter and JSON to CSV Converter convert between CSV and What Is JSON? instantly, handling the quoting rules correctly for you.
CSV to JSON Converter
Comma-Separated Values.
Wrap the entire value in double quotes, so a parser knows the comma inside it is data, not a column separator.
Not entirely. While the basic comma-and-newline structure is consistent, the exact delimiter, quoting rules, and text encoding can vary slightly between different tools and regional conventions.
Not naturally. CSV is built around flat, tabular rows and columns; formats like JSON or XML are better suited to genuinely nested data structures.
Double it. A value like She said "hi" becomes "She said ""hi""" when quoted for CSV.
Find the right tool, or keep reading Brekzy's other guides.