JSON to CSV Flattener
Turn an array of JSON objects into CSV, nested objects flattened to dotted columns and arrays to indexed columns, JSON text or joined cells, or exploded rows.
A CSV with the union of all keys as the header, nested values flattened the way you choose, an optional explode-join on an array key, and RFC 4180 quoting — ready to download.
Example: [{"id":1,"tags":["x","y"],"address":{"city":"B"}}] becomes the columns id, tags[0], tags[1], address.city; exploding "items" turns an order with two items into two rows sharing the order fields.
Nested in,
flat columns out.
The flattening rules, the three ways to treat arrays, and the explode option.
Flattening
Nested objects become dotted columns (address.city); nested arrays become indexed columns (tags[0], tags[1]) by default. The header is the union of every key seen, in first-seen order; a row without a key leaves the cell empty. Empty arrays and objects produce no column.
Arrays three ways
Indexed columns keep every element addressable but widen the table; "JSON text" keeps the array in one cell as JSON; "joined" writes the elements separated by "; ". Choose by what the receiving spreadsheet or importer expects.
Explode
Exploding an array key (items) writes one row per element, repeating the parent fields — the join that most reporting tools want. Records without that array are kept as single rows and counted. Output follows RFC 4180 quoting. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- Flattening convention: dotted paths for objects, [index] for arrays (as in many ETL tools); RFC 4180 CSV quoting via the shared writer
Last reviewed 20 September 2026. How results are checked: How we verify.