JSON to CSV Converter
Convert JSON arrays into CSV tables, or turn CSV back into JSON, locally and without uploading data.
Convert JSON to CSV and CSV to JSON
paste an array of JSON objects and select To CSV. The converter will use the union of the first seen object keys to create the header, write one object per line and apply CSV quoting if a cell contains a comma, quote or newline. In the other direction, the first row of the CSV becomes the property names for each object created.
The two transformations run in the browser. They are for fast, inspectable data exchange, not a full spreadsheet import pipeline.
How the conversion handles edge cases
- Quoting — fields containing commas, quotes, or line breaks are wrapped in double quotes; internal quotes are doubled.
- Missing keys — every discovered key becomes a column, and an absent value becomes an empty cell.
- Nested data — objects and arrays are serialized as compact JSON text inside one cell.
- Primitive input — a non-object value or an array of primitives uses a single
valuecolumn. - CSV types — exact lowercase
true,false, andnullbecome their JSON primitives. Canonical numeric strings may become numbers; other values remain strings.
The JSON side attempts common syntax repair if strict parsing fails. Review that repaired meaning before trusting the table, or clean and inspect it first with JSON Fix.
Why a round trip may not be identical
CSV does not have an object model, or a type system. Both an empty string and a missing JSON property are displayed as an empty-looking cell. Nested JSON remains as text, but when you convert the CSV back, that cell won’t automatically be parsed into an object. Spreadsheet applications may also re-interpret long IDs, dates or leading zeros.
If you need exact types, use the original JSON and consider CSV as an export. Quote identifier-like values in the source system, verify the file in the target spreadsheet or database, and compare row counts and key columns after import.
For a longer workflow, see How to Convert JSON to CSV (and Back).
FAQ
How are nested JSON objects represented in CSV?
Each nested object or array is rendered as a single-quoted cell of compact JSON text. This preserves the information for a later explicit parse, but CSV-to-JSON does not automatically recover the nested type.
Will long numeric IDs remain exact?
Not reliably. Both JavaScript and spreadsheet programs can coerce large or formatted numbers. Leave identifiers as strings, and check them after conversion.