UTILS.
100% in-browser
🔗

JSON to CSV (Flatten Nested)

Convert a JSON array of objects to CSV, flattening nested keys to dot-notation columns.

output

About this tool

JSON to CSV is a free, in-browser converter that turns a JSON array of objects into a clean CSV, flattening any nested objects into dot-notation columns such as addr.city or addr.zip. It runs entirely on your device, so your JSON is never uploaded.

The tool scans every record to build the full union of columns, so rows with different shapes still line up, and it quotes fields safely when they contain the delimiter, quotes, or newlines. Nested arrays are expanded into indexed columns (tags.0, tags.1) by default, or you can join array items into a single cell instead.

This is the opposite direction of our CSV ⇄ JSON Converter, and it is a spreadsheet-ready sibling of our JSON Flatten tool: use JSON Flatten when you want a flat JSON object, and this tool when you want downloadable CSV columns.

Frequently asked questions

How is nested data flattened?
Object keys are joined with dots (user.address.city), so each leaf value becomes its own column. Nested arrays become indexed columns like tags.0 and tags.1 unless you enable the join option, which puts all array items in one cell separated by semicolons.
What if records have different fields?
The converter takes the union of every record's flattened keys as the column list, filling in blanks where a record lacks a value, so uneven or optional fields still produce a consistent table.
How is this different from the CSV ⇄ JSON Converter or JSON Flatten?
Our CSV ⇄ JSON Converter goes the other way (CSV in, JSON out). JSON Flatten produces a flattened JSON object, whereas this tool outputs CSV rows and columns ready for a spreadsheet or database import.
What CSV conventions does the output follow?
The first line is the header of dot-notation column names, fields are separated by your chosen delimiter, and any field containing that delimiter, a double quote, or a newline is wrapped in double quotes with inner quotes doubled (RFC-4180 style).

More tools