{ } JSON Workbench0 network requests. Check DevTools

"Unflatten JSON":{ }

Rebuilds nested JSON from a flat path → value map: dots become object keys, [index] brackets become array positions. The inverse of Flatten. Runs entirely in your browser.

How to use

  1. Paste a flat JSON map whose keys are dot/bracket paths (a.b[0].c).
  2. The tool rebuilds the nested objects and arrays those paths describe.
  3. Copy or download the reconstructed JSON.

Examples

Dot paths → nested objects

Input
{ "user.name": "Alice", "user.address.city": "Boston" }
Output
{
  "user": {
    "name": "Alice",
    "address": { "city": "Boston" }
  }
}

Bracket indexes → arrays (edge case)

Input
{ "items[0].sku": "A1", "items[1].sku": "B2" }
Output
{
  "items": [
    { "sku": "A1" },
    { "sku": "B2" }
  ]
}

FAQ

What does unflatten do?

It reverses flattening: keys like a.b[0].c are parsed back into nested objects and arrays.

What key syntax is supported?

Dots for object keys and [index] brackets for array positions, the same notation our Flatten tool emits.

Do flatten and unflatten round-trip?

Yes for typical data. Exceptions: keys that themselves contain dots, and empty objects/arrays (they have no leaf paths).

Is my data uploaded?

No. Everything runs in your browser with zero network requests.

Related tools