Free JSON developer tool

Flatten or Unflatten JSON Online

Convert deeply nested JSON into flat path-value pairs for spreadsheets, logs, exports, analytics and debugging, or reconstruct nested objects and arrays from dot and bracket paths.

🔒 Your data stays in your browser. FixTools does not upload this JSON for processing.

How to use JSON Flatten & Unflatten

  1. Step 1

    Choose Flatten to convert nested JSON into path-value pairs, or Unflatten to reconstruct nested data from an object whose keys contain dot and bracket paths.

  2. Step 2

    Paste valid JSON into the editor. For unflattening, use keys such as user.name, user.address.city, or items[0].sku.

  3. Step 3

    Run the transformation and copy the resulting JSON. Validate the result if it will feed another API, data pipeline, or application.

Flatten nested JSON example

A nested customer record can be converted into simple path-value pairs that are easier to inspect, export, log, or map into tabular systems.

Example input

{"user":{"name":"Ada","address":{"city":"London"}},"tags":["dev","json"]}

Example output

{"user.name":"Ada","user.address.city":"London","tags[0]":"dev","tags[1]":"json"}

What this tool does

Flattening converts nested objects and arrays into path-value pairs such as user.address.city or items[0].sku. Unflattening performs the reverse operation by interpreting those paths and rebuilding nested containers.

Common use cases

  • Prepare nested API data for CSV or spreadsheet workflows
  • Create simple key-value logs from nested payloads
  • Inspect deeply nested configuration objects
  • Map JSON fields into analytics or ETL pipelines
  • Reconstruct nested test fixtures from flattened representations

How it works

The flattener recursively traverses objects and arrays. Object keys are joined with dots and array positions are represented with bracket indexes. During unflattening, the parser uses numeric path segments to recreate arrays and string segments to recreate objects.

Limitations and edge cases

Keys that literally contain dots or bracket notation can be ambiguous because the flattened format uses those characters as path syntax. Empty objects and empty arrays also carry less information in a simple path-value representation. If exact round-trip fidelity for unusual keys is required, use a formal path encoding such as JSON Pointer.

Related concepts

Dot notation

Dot notation represents nested object properties as paths such as user.profile.email. It is convenient for humans but does not escape every possible property name.

JSON Pointer

JSON Pointer is a standardized syntax for identifying a value inside a JSON document and is a better fit when property names contain special path characters.

JSON Flatten & Unflatten FAQ

What does it mean to flatten JSON?

Flattening JSON converts nested objects and arrays into a single-level object whose keys describe the original paths, such as user.address.city.

Why flatten JSON before exporting to a spreadsheet?

Tabular formats work best with simple columns. Flattening turns nested fields into stable column-like paths that are easier to map to CSV or spreadsheet headers.

Can flattened JSON be converted back to nested JSON?

Yes, when the path notation is unambiguous. This tool interprets dot-separated object properties and numeric bracket indexes to rebuild nested objects and arrays.

What happens if a JSON key contains a dot?

A literal dot can be confused with path syntax in this simple representation. For those documents, use an escaping convention or a standardized format such as JSON Pointer.

Related JSON tools