JSON to CSV
Convert JSON records into a spreadsheet-ready CSV, flattening nested fields.
Rows From Records
An API returns JSON; a colleague wants a spreadsheet. The conversion is conceptually trivial and practically annoying, because real JSON is not a table: records have different keys, values are nested several levels deep, and arrays do not fit in a cell at all.
The approach here is to take the union of every key across every record as the column set, so a record missing a field gets an empty cell rather than a shifted row — which is the failure mode that quietly corrupts a spreadsheet and is not noticed until much later.
Key features
- Columns are the union of all keys — a missing field leaves an empty cell, never a shifted row.
- Nested objects flattened — into dotted column names, or kept as JSON in one cell if you prefer.
- Arrays joined with semicolons — because a comma inside a comma-separated file is the one thing worth avoiding.
- Unwraps API envelopes — an object containing a single array is treated as that array.
- Excel-friendly output — with the byte-order mark that stops Excel mangling accented characters.
This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.
How to use: JSON to CSV
- Paste the JSON
An array of objects is the usual case; a single object becomes one row. - Choose the delimiter
Comma for most things; semicolon for European locales where Excel expects it. - Decide about nesting
Flattening gives dotted columns; turning it off keeps the object as JSON in one cell. - Check the preview and download
The first rows are shown as a table so you can see the shape before saving.
Technical specifications
| Processing location | Entirely in your browser — no server round trip |
|---|---|
| Data uploaded | None. Files and text never leave your device |
| Price | Free — no account, no trial, no usage cap |
| Category | Converters |
| Works offline | Yes, once the page has loaded |
| Browser support | Chrome 90+, Edge 90+, Firefox 90+, Safari 15+ |
| Interface languages | English, 中文, हिन्दी, Español, العربية |
Frequently asked questions
Why does Excel show my accented characters as gibberish?
Because Excel guesses a CSV's encoding from the locale unless the file begins with a byte-order mark. The "Excel-friendly encoding" option adds one, which makes Excel read the file as UTF-8. Leave it on unless the file is going somewhere that objects to the mark.
What happens to nested arrays of objects?
They are serialised as JSON inside the cell, because there is no sensible way to put a list of records into one column. If the nested array is the data you actually want, extract it first and convert that instead — a table can only have one level of rows.
Why are my columns in that order?
First seen, first placed: the order follows the shape of the data rather than the alphabet, so a record's natural field order survives. Columns that only appear in later records are appended at the end.
My JSON is an object with the array inside it — do I need to edit it?
No. An object containing exactly one array is treated as an envelope and unwrapped automatically, which covers the common {"data": [...]} and {"results": [...]} shapes. The message says which key it unwrapped so you can see what it did.
Does the CSV handle commas and quotes inside values?
Yes. Any cell containing the delimiter, a quote, a line break or leading and trailing spaces is wrapped in quotes with internal quotes doubled, which is the rule every spreadsheet agrees on. That is also what makes a naive split-on-comma reader fail, which is why the reverse tool here parses properly too.