TOOLTIKI Lovable tool, really free
Developer Data

JSON flattener

What to do
Indent

Processed in your browser · nothing is uploaded

Local · empty containers preserved
Advertisement
320 × 100

Turns nested JSON into a flat object whose keys are dotted paths — `user.address.city` — with array positions in brackets. The reverse rebuilds the nesting from the paths.

How to use the json flattener

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

Flattening is what you do to get JSON into something that only understands rows and columns: a spreadsheet, a CSV, an analytics event, a form-encoded body, an environment variable set. The dotted-path convention is the one almost everything uses, with `[0]` for array positions so a path can be read back unambiguously. The part to be careful about is keys that already contain a dot. `{"a.b": 1}` and `{"a": {"b": 1}}` flatten to the same path, and unflattening cannot tell them apart — the round trip is lossy exactly there. If your data has dots in its keys, flattening is the wrong move, or you need a different separator. Empty objects and arrays are kept visible rather than dropped, because they carry meaning: a `tags: []` that vanishes on flattening reappears as "no such field" after the round trip, which is not the same thing at all.

Questions

By position in brackets: items.0.name becomes items[0].name, which reads back unambiguously.

MDN — Working with JSON
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING