Turn JSON into CSV that a spreadsheet can open
Turn an API response into rows someone can open in a spreadsheet.
Someone who does not write code needs the data. It is in an API response or an export file as JSON, and they want to filter it, sum a column or send it to their manager, which means a spreadsheet. You can write a script, but for a one-off it is slower than it should be, and the first thing a quick conversion tool tells you is that your file is "not an array".
This template covers the whole small job. You look at the shape of the data first, because conversion to CSV works on a list of records and not on a deeply nested document. Then you format it so errors show up, convert it with the delimiter the other person's spreadsheet expects, and open the result in a sheet to check the columns before you share it.
It is aimed at a developer helping a colleague, and at an analyst who received JSON and wants a table.
Use it now
5 tasks, in the order you do them. Tasks with a tool open it with the job's files and tick themselves when you save the result.
- 1Get the JSON and check it is an array of objects
- 2Format and validate itJSON Formatter
- 3Convert it to CSVJSON to CSV Converter
- 4Open it in the sheet and check the columns
- 5Share the file
Step by step, and why the defaults are what they are
1. Get the JSON and check it is an array of objects
Look at the top of the file. A list of records looks like [ { "id": 1, "name": "A" }, { "id": 2, "name": "B" } ]. If the list is inside another object, for example under "data" or "items", plan to copy only the list.
Why this default. Each object becomes a row and each key becomes a column. That shape maps naturally to a table, and others do not, so checking it first saves a confusing result.
2. Format and validate it
Paste it into JSON Formatter and press Format. If there is an error, the message points to the position. Fix it, then copy the formatted list.
Why this default. Conversion tools usually report a bad file with a short, unhelpful message. A formatter tells you where the mistake is, and it is the quickest way to find a stray comma or an unclosed bracket in a long export. Open JSON Formatter.
3. Convert it to CSV
Open JSON to CSV Converter, choose the direction JSON to CSV, paste the list and pick the delimiter. Use a comma by default, or a semicolon if the receiving spreadsheet uses a locale that writes decimals with a comma. Copy the output or save it as a file.
Why this default. Values with commas, quotes or line breaks are quoted by the CSV rules, so addresses and descriptions stay in one cell. The delimiter matters: in many European settings, a spreadsheet opens a comma-separated file as a single column and expects semicolons. Open JSON to CSV Converter.
4. Open it in the sheet and check the columns
Open the file in the spreadsheet. Check that the number of columns matches the keys, that dates and long numbers are not changed, and that nothing ended up in a single cell as raw JSON.
Why this default. Spreadsheets reformat what they think they recognise: long ids are shown in scientific notation and leading zeros are dropped. Look at the first and the last row, and at any column with identifiers.
Variants
CSV back to JSON
Choose the opposite direction in the converter and say whether the first row is a header, to get a list of objects for a script or an import.
Nested data
Objects inside objects will not fit one cell cleanly. Pull out the part you want first, or flatten the nested values in your script before converting.
A very large export
A browser handles files of a few megabytes comfortably. For something much larger, split the array into pieces and convert them one at a time.
Common problems
The converter says it needs an array.
The file is a single object. Copy the list inside it, usually under a key like "items" or "results", and convert that.
Some columns are missing.
The columns come from the keys the tool sees. If only some records have a key, check that it has been included, and add a placeholder value in the first record if it has not.
Accented characters look broken in the spreadsheet.
The spreadsheet opened the file with the wrong encoding. Use its import option and choose UTF-8, instead of double-clicking the file.
Long numbers show as 1E+15.
The spreadsheet treats them as numbers. Format the column as text before pasting, or import it and set the column type to text.
Questions
Is my data uploaded?
No. The conversion runs in your browser. If the data is sensitive, you can also turn the network off after the page has loaded.
Will it keep the order of the keys?
Columns follow the keys of the records. If you need a certain order, rearrange the columns in the spreadsheet.
Can I send the CSV to my colleague through TabShed?
Not through a server. Send the file yourself, or use Transfer Files to move it between your own devices.
More in the Developer kit
- Daily scratchpad – Colours, JSON, diffs and regexes in one place, with the useful ones kept in a note.
- Bug report – Steps, log, config diff and a small screenshot, ready to paste into the tracker.
- Release check – A short checklist plus a diff of the config that changes between environments.