TOOLTIKI Lovable tool, really free
Developer Data

JSON unflattener

What to do
Indent

Processed in your browser · nothing is uploaded

Local · path decides the container
Advertisement
320 × 100

Rebuilds nested JSON from flat dotted-path keys. `user.address.city` becomes an object three levels deep, and `items[0]` becomes an array element.

How to use the json unflattener

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

This is the direction you need after the data has been through something flat. A CSV export, a form post, a set of environment variables and most analytics payloads all arrive as one level of keys, and the structure the application expects has to be put back. A path decides the container type it creates: a bracketed number makes an array, a name makes an object. `a[0].b` produces an array containing one object. That means the same prefix cannot be both — `a[0]` and `a.x` in the same input describe a value that is an array and an object at once, and the later key wins rather than the tool guessing. One practical note about ordering: array indices are filled at the position given, so a flat set that skips an index produces a sparse array with nulls in the gaps. That is faithful to what the keys said, and usually means the flat data lost a row somewhere upstream.

Questions

By the path. A bracketed number makes an array position, a name makes an object key.

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