Nested JSON to CSV

Flatten an array of nested JSON objects into a clean CSV with dot-notation column headers.

Tool input is processed locally in your browser and is not submitted to CodeNimbleTools. Avoid pasting production secrets into any device or website you do not fully trust.

CSV output

  

About this tool

Spreadsheets don't understand nesting — but your API data is full of it. This converter flattens each object in a JSON array and produces a proper RFC-4180 CSV: dot-notation headers, quoted cells where needed, and a consistent column set across all rows even when objects differ.

Pick comma, semicolon or tab delimiters to match your locale and spreadsheet app.

How to use it

  1. Paste a JSON array of objects (a single object also works).
  2. Choose the delimiter and path separator.
  3. Click Run, then copy or download the CSV.
  4. Open it in Excel, Google Sheets or LibreOffice.

Useful ways to apply it

  • Exporting API responses to Excel for non-technical teammates.
  • Turning MongoDB-style documents into flat rows for analysis.
  • Building quick reports from webhook payload logs.
  • Feeding nested data to tools that only accept CSV.

Worked example

Example input

[{"user":{"name":"Ada"},"tags":["admin","dev"]}]

Expected output

user.name,tags.0,tags.1\r\nAda,admin,dev

Edge cases to check

  • Different rows can expose different nested keys, so the union of headers can grow.
  • Arrays are flattened to numeric path segments rather than serialized as one field.
  • CSV quoting is required for delimiters, quotes and embedded line breaks.

Known limitations

Flattening nested JSON into columns is inherently lossy as a data model. Test a round trip if preserving exact object/array shape matters.

How this tool was reviewed

Reviewed with nested objects, arrays, missing fields, nulls, embedded delimiters/quotes and multi-row header union.

Last reviewed: September 3, 2026 · Maintainer: William

Standards and technical references

Frequently asked questions

How are missing keys handled?
The header row is the union of all keys found. Rows missing a key get an empty cell, so columns always line up.
What happens to arrays inside objects?
Array elements become numbered columns: tags.0, tags.1 and so on.
Will commas inside values break the CSV?
No — cells containing the delimiter, quotes or newlines are quoted and inner quotes doubled per RFC 4180.

Privacy

Tool input is processed locally in your browser and is not submitted to CodeNimbleTools. Avoid pasting production secrets into any device or website you do not fully trust.