My Tools Garage

JSON Unflattener

Rebuild nested JSON from dot-notation keys.

in-browser

How to use

  1. 1 Paste a flat JSON object of key → value pairs.
  2. 2 Set a custom delimiter if your keys do not use dots.
  3. 3 Read the rebuilt nested JSON on the right.
  4. 4 Copy the formatted result.

About JSON Unflattener

The JSON Unflattener rebuilds a deeply nested JSON structure from a flat object whose keys describe the path to each value.

Give it something like {"user.name":"Ada","user.roles.0":"admin"} and it returns a proper nested object with a roles array inside a user object.

It is the exact inverse of flattening, which makes it the missing half of many data pipelines, config loaders and spreadsheet exports that store nested data as dotted keys.

It understands two common path styles.

Dot notation such as a.b.c nests objects, and a numeric segment such as a.0 becomes an array index, so consecutive numeric keys produce a real array rather than an object with string keys.

Bracket notation for indices, like a[0].b or matrix[1][2], is also accepted and treated the same way.

If your keys use a different separator, set a custom delimiter and the tool will split on that instead, which is handy for keys that contain dots.

The output is pretty-printed and updates live as you edit.

Invalid JSON and non-object inputs are reported with a clear message rather than a silent failure, so you always know why nothing changed.

Everything runs locally in your browser with no network calls, keeping your data private, and it pairs naturally with a flattener for round-tripping configuration between flat and nested forms.

FAQ

How are arrays detected?

A path segment made entirely of digits, like a.0 or a[0], becomes an array index. Consecutive numeric keys build a proper array instead of an object.

What if my keys contain dots?

Change the delimiter field to a character your keys do not use, such as a slash, and the tool will split paths on that separator instead of the dot.