JSON flattener
Processed in your browser · nothing is uploaded
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
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.