JSON to CSV

Convert JSON arrays and objects to CSV format instantly. Supports nested objects with dot notation.

Paste a JSON array of objects (a single object also works — it becomes one row) and this produces a CSV whose header row is the union of every key found in every record, in first-seen order. Rows missing a key get an empty cell rather than a shifted column, which is the failure mode hand-rolled converters usually get wrong.

The flattening rules, precisely

Nested objects recurse into dot-joined column names to any depth — address.geo.lat is a single column. Arrays do not recurse: an array of primitives is stringified into one cell, so ["admin","ops"] becomes the single quoted value admin,ops (readable, but no longer machine-splittable once other commas exist). An array of objects degrades to [object Object], which is your signal that the data is relational, not tabular — flatten orders into their own array and convert it as a second CSV instead.

null, undefined, and absent keys all land as empty cells, so you cannot distinguish an explicit null from a missing field after conversion. Every cell is quoted unconditionally, and booleans and numbers arrive as their string forms — Excel and Google Sheets will re-infer the types on import.

Nested objects and uneven keys
Input: [{"name":"Alice","address":{"city":"Austin","zip":"78701"}},{"name":"Bob","age":25}]
Output: "name","address.city","address.zip","age" "Alice","Austin","78701","" "Bob","","","25"
Nested objects flatten to dot-notation columns; Bob simply has empty address cells.
Quote escaping (RFC 4180)
Input: [{"note":"she said \"hi\""}]
Output: "note" "she said ""hi"""
Internal quotes are doubled, so commas and line breaks inside values cannot break the row structure.
Good to know: The downloaded data.csv is plain UTF-8 without a byte-order mark. Double-clicking it in Excel on Windows can garble accented characters, and the Excel editor on this site currently shares that limitation with BOM-less files. Import it via Data > From Text/CSV and pick 65001: Unicode (UTF-8), which decodes it correctly; purely ASCII data is unaffected either way.

Run unfamiliar payloads through the JSON formatter first — this converter reports only that input is invalid, while the formatter's strict validation helps you narrow down where. The Excel editor opens the resulting CSV directly in your browser for quick edits.

Further reading