JSON to CSV

Paste a JSON array of objects and get clean CSV out - nested objects flattened, fields quoted to RFC 4180. Nothing leaves your browser.

Turning JSON into a spreadsheet

APIs and config files speak JSON, but spreadsheets, BI tools and a lot of colleagues want CSV. This converter takes a JSON array of objects and lays each object out as a row, with the object keys as column headers. Paste your data above and the CSV appears instantly, ready to copy or download and open in Excel, Numbers or Google Sheets.

Nested objects and mixed keys

Real JSON is rarely flat. When a value is itself an object, its keys are joined with dots - so { "addr": { "city": "NYC" } } produces a column named addr.city. When a value is an array, it stays in one cell as compact JSON, which keeps the row count honest. And because different records often carry different fields, the column set is the union of every key across all rows, so a record missing a field just leaves that cell blank rather than shifting the columns out of line.

Correct quoting matters

The commonest way a CSV export breaks is a value that itself contains a comma, a quote or a newline. This tool follows RFC 4180: any such field is wrapped in double quotes and any embedded quote is doubled, so Smith, John round-trips safely. Switch the delimiter to semicolon or tab if your locale or target app expects it - semicolon is common in European Excel.

Need to go the other way, or tidy the JSON first? Try the CSV to JSON converter, pretty-print your input with the JSON formatter, or format a query with the SQL formatter once the data is loaded.

Frequently asked questions

What shape of JSON does this expect?
An array of objects, where each object becomes one CSV row. If you paste a single object it is treated as a one-row table. Anything else - a bare number, a string, or an array of numbers - is rejected with a message explaining why.
How are nested objects handled?
They are flattened into dot-notation columns. So {"user": {"name": "Ann"}} becomes a column called user.name with the value Ann. Arrays inside a value are kept intact as a JSON string in a single cell.
What happens when rows have different keys?
The columns are the union of every key seen across all rows, in first-seen order. Any row missing a given key simply gets an empty cell for it, so nothing is lost or misaligned.
Does it quote fields correctly?
Yes. It follows RFC 4180: any field containing the delimiter, a double quote or a line break is wrapped in double quotes, and embedded double quotes are doubled. Plain values are left unquoted.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser with JavaScript. Nothing you paste is sent to a server, so it is safe for private exports.