JSON to CSV: Turn API Data Into a Spreadsheet That Makes Sense
JSON is built for machines. Nested objects, arrays inside arrays, keys you have never seen before. The moment a human has to look at it — a client, a coworker, yourself on a Monday morning — you want a spreadsheet.
Here is the pain, and how to skip it.
Why the lazy conversion fails
Most tools flatten JSON one level deep and call it done. Nested objects turn into [object Object], arrays get dumped into one ugly cell. The file opens, but it is junk.
The fix is to decide, before converting, what one row means.
Pick the row: object or array element
Two shapes cover almost everything:
- Array of objects — the most common API response. Each object becomes a row, each key becomes a column.
- Single object — one row, or transpose it so the keys become rows.
If the keys are inconsistent (one record has extra fields), most converters drop the missing values silently. Set them to empty instead of guessing.
Flatten, but on purpose
A nested object like `{"user": {"id": 7}}` should become the columns `user.id` and `user.name`. Arrays are trickier: either join them into one cell with a separator, or expand them into multiple rows. Do not let the tool decide for you.
When it is a whole folder
One JSON file is a copy-paste. Fifty log exports every night is a chore. FileTools Batch Convert takes the whole set and hands back CSVs at once.
The takeaway
Know what a row is, decide what nested data becomes, keep the encoding UTF-8. Do that and JSON stops being scary. Run it in the browser at FileTools — nothing leaves your machine.