Arrays of objects in both directions
JSON to CSV flattens nested objects into dot-separated columns and joins array values with a semicolon. The header is the union of every key seen, in first-appearance order, and rows with missing keys leave those cells empty. CSV to JSON reverses the process, treating the first row as the header and quoting fields that contain commas, quotes or newlines.
A worked example
[{"name":"Ada","tags":["math","code"]}] becomes a two-column table with the header name,tags and the row Ada,math; code. The array is joined rather than quoted because a semicolon is not a CSV delimiter. More rows with different keys add columns rather than failing.
What stays and what is lost
Numeric-looking cells come back as strings in the CSV direction, because CSV has no type information. Deeply nested objects become long dotted headers. Blank rows are dropped on the way in, and a carriage return is ignored, so Windows files import cleanly.
Where it stops
- The delimiter is always a comma; tabs and semicolons are not options.
- The JSON top level must be an array of objects; a single object or a bare array of values is rejected.
- Arrays are joined, not expanded into one row per item.
- No streaming, so very large files depend on browser memory.
Questions people ask
Why did my JSON fail?
Usually the top level is not an array, or the array is empty. Validate it first with the JSON validator.
Can I convert to YAML instead?
Yes, with the JSON and YAML converter. For spacing and indentation, the JSON formatter handles the JSON side.