JSON ⇄ CSV Converter

[ CSV ]
name,city,salary,team Juan Cruz,"Cebu, Philippines",45000, Ana Reyes,Davao,52000,Payroll
2 rows · 4 columns
Rows2
Columns4
Not every record carries every field. The columns are the union of all of them and the gaps are left empty — taking the columns from the first record alone would silently drop a field that only some records have.
[ WHAT THIS IS ]

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.

[ QUESTIONS ]

Why does a field come out wrapped in quotes?

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.

Why did my very long number survive here when other tools round it?

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.

What happens to nested objects and arrays?

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.

Why are my columns taken from more than the first record?

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.

What is CSV injection and why does the page warn about it?

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.

Why did my phone number turn into a different number?

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.

What happens if my CSV header repeats a column name?

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.

[ THE MATHS ]
When a field needs quoting
Cebuno
Cebu, Philippinesholds the delimiter
say "hi"quote is doubled
line one ⏎ line twoholds a newline

Because a quoted field may contain a newline, the row boundary is not knowable without tracking quote state.

[ CSV INJECTION ]

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.

[ NEXT ]
43JSON FormatterThe same parser, for tidying rather than converting
48Text ComparisonCheck a round trip changed nothing
73MIME Type LookupWhat to serve a .csv as
55Text RedactorBefore the file goes to somebody else
[ 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.