JSON to CSV
Convert a JSON array to CSV, flattened for spreadsheets
Everything runs in your browser. Your JSON is never uploaded or stored on a server.
You've got a JSON array from an API or an export, and you need it in a spreadsheet. Paste it here and each object becomes a row, with the keys as column headers. The part most converters get wrong is nested data: they dump a whole nested object into one cell as a JSON blob. This one flattens it instead, so address.city and address.zip come out as their own columns. Pick your delimiter, copy or download, and none of it leaves your browser.
What it does
A CSV is rows of values with a header line on top, which is what spreadsheets and most data tools expect. JSON is nested and hierarchical, so getting from one to the other means flattening that structure into a flat grid. This tool takes a JSON array of objects, turns each object into a row, and uses the keys as the column headers.
If your objects don't all have the same keys, that's fine. The converter looks at every object, collects all the keys it finds, and lines them up as columns. Where a row is missing one of them, that cell is just left empty.
How nested data is handled
Real API responses are rarely flat. When an object holds another object, the converter walks into it and joins the keys with a dot, so {"address": {"city": "London"}} turns into a column named address.city. That's the useful part, because a nested object crammed into a single cell as JSON is painful to work with in a spreadsheet.
Arrays are a different story, since a single cell can't really hold a list. An array value gets written as its JSON text inside the cell. And if you'd rather keep nested objects whole instead of splitting them into dotted columns, turn Flatten off and they'll be written as JSON too.
{ "name": "Ada", "address": { "city": "London" } }
name,address.city
Ada,LondonDelimiters and escaping
Comma is the default, but you can switch to semicolon, tab, or pipe. Semicolon is worth knowing about, because spreadsheet software in a lot of European locales expects it instead of a comma. Tab gives you TSV, which pastes straight into a spreadsheet cleanly. Pipe is handy when your data itself is full of commas.
Whatever delimiter you pick, the converter follows the standard CSV escaping rules. If a value contains the delimiter, a quote, or a line break, it gets wrapped in double quotes, and any quotes inside it are doubled. That's what stops a value like "Smith, John" from being read as two separate columns.
Wrapped arrays and where the data goes
A lot of APIs don't hand you a bare array. They wrap it, like {"users": [ ... ]}. When the converter sees a single array of objects sitting inside an object like that, it pulls it out automatically and tells you which key it used, so you don't have to reshape the JSON first.
All of this happens in your browser with JavaScript. The JSON you paste is never sent to a server, which matters when you're converting a real export with real people's data in it.