JSON to CSV converter
Paste an array of objects. Nested objects are flattened one level (address.city), arrays and deeper values are serialized as JSON strings, and you can download the CSV. A single object is treated as one row.
Need the reverse? Use the CSV to JSON converter, or convert YAML with the YAML to JSON converter.
Example
Two customers with a nested address
[{"name":"Ada","address":{"city":"London"}},{"name":"Alan","address":{"city":"Wilmslow"}}] becomes columns name, address.city.
Related: JWT decoder, YAML to JSON converter, CSV to JSON converter
FAQ
- Is my JSON uploaded?
- No. Parsing and flattening run in this tab. There is no upload and no API route for your JSON. Disconnect the network first if you need a stronger guarantee.
- What JSON shape is accepted?
- An array of objects, or one object. A top-level array of scalars is rejected because it has no column names. Invalid JSON shows an error instead of a partial file.
- How far do you flatten?
- One level. { address: { city: "X", geo: { lat: 1 } } } becomes address.city and address.geo, with the geo value stringified. Deeper automatic flattening is easy to get wrong, so we stop at one hop.
- How are commas and quotes escaped?
- Fields that contain commas, quotes, or newlines are wrapped in double quotes, and quotes inside a field are doubled. That matches RFC 4180 enough for Excel, Sheets, and most parsers.
- I have YAML, not JSON. What should I use?
- Convert YAML to JSON on this site first, then bring the JSON here. The YAML tool can also go the other way if you need to round-trip.
- How do I convert JSON to CSV the same way?
- JSON.parse. Accept one object (one row) or a non-empty array of objects. Flatten one level: nested objects become key.child columns; arrays and deeper values are JSON.stringify’d into the cell. Column order is first-seen. Escape fields that contain quotes, commas, or newlines by wrapping in double quotes and doubling internal quotes. Join with commas and newlines, and end with a trailing newline.