Convert between JSON and CSV, quoting and numbers handled properly.
What it's for
Turn a list of records in JSON into a CSV that a spreadsheet can open, or a CSV back into JSON, without breaking addresses, names with commas or long numbers.
Before you start
Have the data to hand, copied from a file, an app or a spreadsheet. It is converted in your browser and nothing is sent anywhere.
Choose the direction
In Direction, pick JSON to CSV to make something a spreadsheet opens, or CSV to JSON to go the other way.
Paste your data
Replace the sample in the big box with your own. CSV is the plain-text form a spreadsheet saves: one row per line, with a character between the columns.
Set the delimiter
Delimiter is that character. Comma suits most .csv files; pick Semicolon or Tab if your file uses one of those.
Decide about numbers (CSV to JSON only)
Write numbers as numbers turns a value like 45000 into a number rather than text. Untick it to keep every value as text, exactly as written.
Convert and copy
Press Convert. The result is in the band at the top of the card — it also changes as you type — and Copy puts it on your clipboard.
Check the round trip, if you like
Swap and convert back feeds the result back in the other direction, so you can see nothing was lost.
Reading the result
If it goes wrong
CSV is not "split on commas", and that is the whole job. A field may contain a comma, a newline or a quote — and RFC 4180 handles all three by quoting the field and doubling any quote inside it.
A converter that simply splits on commas corrupts exactly the data most worth converting — an address, a note, a name with a comma in it — and does it silently.
Numbers are re-emitted verbatim. JSON.parse turns every number into a float, so 1234567890123456789 comes back …800 and 1.0 becomes 1. A converter is asked to change the format, never the values.
And a field starting with = is a formula to a spreadsheet. It is reported, never altered.
Because it contains a comma, a quote or a newline, and CSV handles all three by quoting the field. A converter that simply joins values with commas corrupts exactly the data most worth converting — an address, a note, a name with a comma in it — and does so silently. A quote inside a quoted field is written twice, which is the rule from RFC 4180.
Because this does not parse your JSON with JSON.parse, which turns every number into a floating-point value — 1234567890123456789 comes back as …800, and 1.0 comes back as 1. A converter is asked to change the format, never the values, so numbers are re-emitted exactly as they were written. It uses the same hand-written parser as the JSON Formatter for the same reason.
A nested object is flattened into parent.child columns, which is what a spreadsheet can hold. An array is written as JSON inside a single cell — its length varies from row to row, so spreading it across columns would make the column set as wide as the longest array in the file with most rows empty.
Because taking them from the first record alone silently drops any field that only some records carry — and the rows that did have it look perfectly fine afterwards, which is how the loss goes unnoticed. The columns are the union of every record’s keys, and gaps are left empty.
A cell beginning with =, +, - or @ is treated as a formula by Excel and Google Sheets, so a field reading =HYPERLINK(...) becomes a live link when somebody else opens the file. This page reports every such field rather than altering it: prefixing a quote would change your data, and this is a converter. Handle them before sending the file on.
Because number inference dropped the leading zero — 0917 becomes 917. Values that look numeric are written as numbers by default, which is usually wanted and occasionally wrong. This page keeps a value with a leading zero as text, but if you want everything kept as text, switch the inference off.
The last column of that name wins, because a JSON object cannot hold the same key twice. The page says so rather than letting the earlier column vanish quietly — rename the columns first if both matter.
Because a quoted field may contain a newline, the row boundary is not knowable without tracking quote state.
A cell beginning with =, +, - or @ is executed by Excel and Sheets. The page reports it and does not alter it: prefixing a quote would change your data, and this is a converter.
Important
Runs entirely in your browser; nothing is transmitted. Numbers are re-emitted exactly as written rather than passed through a float. Fields a spreadsheet would treat as a formula are reported, never altered — changing them would change your data. Nothing you type here is sent to our servers — the calculation runs entirely in your browser.