Utility guide
Converting between CSV and JSON, and where it quietly breaks
CSV is a spreadsheet’s native shape: rows and columns, one header row naming each field. JSON is what most APIs and scripts actually want: an array of objects, each field named on every record. The two shapes map onto each other cleanly — the header row becomes the object keys — but a naive splitter that just breaks on every comma gets this wrong the moment a field contains a comma itself.
Where a naive split-on-comma converter breaks
name,age,city
Ada Lovelace,36,London
Grace Hopper,85,"New York, NY"Grace Hopper’s city is New York, NY — one field, containing a comma, wrapped in quotes exactly so a real CSV parser knows not to split it into two columns. The rules the format actually follows (RFC 4180, though most real-world CSV only loosely follows it): a field containing a comma, a quote, or a newline gets wrapped in double quotes, and a literal quote inside a quoted field is written as two quotes in a row (""). This converter’s parser follows those rules in both directions — converting to JSON and back to CSV round-trips to the same file.
What CSV → JSON does with the header row
The first row becomes the key names for every object that follows. A row shorter than the header (a trailing empty field with nothing after its last comma) fills the missing key with an empty string rather than leaving it out — every object in the output array has the same shape, which is what most code expects when it iterates the result.
What JSON → CSV does with mismatched objects
When one object has a key another doesn’t, the output CSV gets a column for every key seen across the whole array — a row missing that key gets an empty cell rather than the columns shifting out of alignment. A nested object or array as a value gets written as its own JSON string inside the cell, since CSV has no native way to represent nested structure.
Frequently asked
Does this handle a CSV with a different delimiter, like semicolons?
The parser follows the same quoting rules regardless of delimiter character — European CSV exports (common from Excel set to a European locale) commonly use semicolons instead of commas for exactly this reason, since a comma is the decimal separator there.
What happens to numbers and booleans converting JSON to CSV?
CSV has no native types — everything is text. A number like 36 or a boolean like true in the JSON becomes the literal text 36 or true in the CSV cell, which round-trips back as a string, not a number, if converted back to JSON.
Does this tool upload my data anywhere?
No — the conversion runs entirely in your browser with plain JavaScript, which also means there’s no practical file-size limit beyond what your browser can hold in memory.
