JSON Flattener
Turn nested JSON into a flat list of paths and values for spreadsheets and search, or rebuild nested JSON from such paths.
Use the tool
Loading the tool…
About JSON Flattener
Flatten nested JSON into a list of paths and values, or rebuild nested JSON from such a list. Choose the separator between keys, and how list positions are written: in square brackets, such as items[0].id, or with the separator, such as items.0.id.
Worked example
Paste `{"items":[{"id":1}]}` and flatten it. The output shows `items[0].id` with the value 1.
Limits
Flattening can make very large data harder to read. Check that the separator you choose does not appear in your key names.
How to use JSON Flattener
- Paste your JSON.
- Choose to flatten or to rebuild nested JSON.
- Choose the separator and list style.
- Copy the result.
Good to know
- Numbers are copied exactly as written, so long numbers keep every digit.
- Empty objects and empty lists are kept as values.
- If key names contain the separator or square brackets, the tool warns that the paths cannot be rebuilt exactly.
- Key order is kept.
Frequently asked questions
What does flattening do?
It turns {"a": {"b": 1}} into {"a.b": 1}, so every value has a single path.
Can I use a different separator?
Yes. Type up to three characters, for example an underscore or a slash.
Can I get the nested JSON back?
Yes. Choose rebuild, paste the flat JSON and use the same separator and list style.