How to Flatten JSON

Nested JSON is hard to analyze in spreadsheets and BI tools. Flattening transforms nested keys into a tabular structure.

Example input data

{"user":{"name":"Ana","address":{"city":"Melbourne"}},"roles":["admin"]}

Why this problem matters

Flat key/value output makes it easier to filter, aggregate, and import JSON data into tabular systems without losing structure context.

Solution overview

Use the JSON Flatten tool to create dot-notation fields, then export flattened data as JSON or CSV.

Step-by-step guide

  1. Paste nested JSON into the flatten tool.
  2. Choose whether you want flattened JSON or CSV output.
  3. Run transformation and validate flattened keys.
  4. Copy or download the output for downstream use.

Use the DataToolbox tool

Continue with the JSON Flatten / JSON to CSV to run this transformation in your browser.

Related tools

Related categories and guides