1. Home
  2. Tools
  3. JSON → CSV Converter

Convert JSON to CSV, including the nested parts

Flattening a nested JSON document is the tedious part of every JSON-to-CSV conversion: decide how to name a key that is three levels down, decide what to do with an array, and make sure no row is misaligned. This converter handles all three.

Nesting
Flattened
Delimiter
Configurable
Header
Auto-derived
JSON → CSV Converter Nested keys are flattened into dotted paths

Measured on Apple M4 Max: 8.12 ms flatten and serialise (10,000 rows × 7 columns) See the benchmarks

How to use it

  1. Paste the JSON An array of objects works directly. A single object is treated as one row, and an object whose values are arrays is treated as a set of rows.
  2. Choose the flattening rule Nested objects become dotted keys such as `user.address.city`. Arrays of scalars are joined with a separator, and arrays of objects get an index in the key.
  3. Copy the CSV The header row is derived from the union of all keys across all records, so a field missing in one row still gets a column and an empty cell.

Reference

How nested structures are flattened

JSON pathCSV column
`user.address.city``user.address.city`
`tags: ["a","b"]``tags` (values joined by `; `)
`items[0].sku``items.0.sku`
`id``id`

Questions people ask

How are nested objects converted?

They are flattened into dotted keys. An address object at user.address becomes the column `user.address.city`, and every leaf value in the tree gets its own column.

What happens to arrays?

An array of scalars is joined into a single cell with a separator you can change. An array of objects gets an index in the key path, so `items.0.sku` and `items.1.sku` become separate columns.

Can I change the delimiter to a semicolon?

Yes. Comma, semicolon, tab and pipe are available, which matters for locales where Excel expects a semicolon as the list separator.

Why is a column missing from my output?

It is only missing if no record in the input contained it. Because the header is the union of all keys, a field that appears in a single record still produces a column — the other rows simply have an empty cell.

Does the converter handle a top-level object that is not an array?

Yes. A single object becomes one row, and an object whose values are arrays of objects becomes one row per nested object.

Are values quoted automatically?

Only when they need it — a value containing the delimiter, a quote character or a newline is quoted and internal quotes are doubled, so the result opens cleanly in any spreadsheet.

Details that catch people out

The union header rule

Headers are computed from every record, not just the first. If record three has a key the first record lacks, that key still gets a column and the first two rows simply leave it blank. Deriving headers from the first record alone is the most common way these conversions go wrong.

Flattening is a decision, so it should be visible

Every JSON to CSV converter has to make choices about nested keys and arrays. Hiding those choices behind a download button means you find out about them in Excel. Here the rule is stated on the page and the output shows the exact column names it produced.

  • Dotted key paths make the flattening explicit.
  • The header is the union of all keys, so no row silently loses a column.
  • Delimiter and quoting are configurable for European locales.
  • Numbers and booleans can be emitted as-is or as quoted text.

Last reviewed 2026-09-26. Every tool on DevSnap runs entirely in your browser, so whatever you paste here never reaches a server.