Skip to content

Tools/JSON Flatten

JSON Flatten

Flatten nested JSON, rebuild it, and query with JSONPath. Nothing is uploaded.

Loading tool…

How to use JSON Flatten

  1. 1. Paste JSON. Objects and arrays are walked.
  2. 2. Flatten or unflatten. Paths look like user.address[0].city.
  3. 3. JSONPath. Try $.items[*].sku.
  4. 4. Copy the result. Local only.

About this tool

Nested JSON is right for APIs and wrong for spreadsheets and some form libraries. Flattening gives you a stable key per leaf. JSONPath is the query language that does not require you to write loops.

Path syntax

Object keys are dotted. Array indexes use [n]. Unflatten rebuilds objects and arrays from those tokens.

JSONPath

jsonpath-plus supports $.. recursive descent and filters. Huge documents can be slow; sample first.

Code examples

JSONPath

$..email

Frequently asked questions

Related tools

All tools