Manipulation Tools

JSON Unflattener

Rebuild nested JSON objects and arrays from a flat object with dot or bracket notation keys.

What does this tool do?

Rebuild nested JSON objects and arrays from a flat object with dot or bracket notation keys. Everything runs locally using JavaScript in your browser — nothing you paste or upload is ever sent to a server.

How to use this tool

  1. Paste your flat json into the left-hand box.
  2. Fill in the key notation field above the input.
  3. Click Unflatten JSON.
  4. Copy the nested json from the output box.

Frequently asked questions

How does this tool decide between an object and an array?

If every top-level key (or a nested group of keys) is a plain integer index, that level is rebuilt as an array instead of an object.

What notation should I choose?

Pick dot notation for keys like user.name, or bracket notation for keys like user[name] and items[0] — match whatever format your flat data already uses.

Is this the reverse of the JSON Flattener tool?

Yes, this tool undoes exactly what the JSON Flattener tool does, so you can round-trip data between flat and nested shapes.