Unflatten a JSON Object screenshot

Unflatten a JSON Object

Rebuild nested JSON from dotted paths. A level whose keys are exactly 0..n-1 is restored as an array. Runs in your browser.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What unflattening a JSON object does

Each key is split on the delimiter and the branches are created as needed, so the order of the input does not matter. After the tree is built, any level whose keys are exactly the integers 0 to n-1 is converted to an array, which is what restores an array that flatten turned into indexed paths. The input must be an object of paths: an array or a scalar is refused with a message rather than silently wrapped.

How to use it

Unflatten a JSON Object: paste the flat JSON into the box above, set Delimiter (default ".") and Indent (default 2), and press Run to get the nested JSON below.

Worked example

Input:

{
  "user.name": "Ada",
  "user.roles.0": "admin",
  "user.roles.1": "author",
  "count": 3
}

Output:

{
  "user": {
    "name": "Ada",
    "roles": [
      "admin",
      "author"
    ]
  },
  "count": 3
}

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads flat JSON and returns nested JSON; reloading the page discards both.

Each key is split on the delimiter and the branches are created as needed, so the order of the input does not matter. After the tree is built, any level whose keys are exactly the integers 0 to n-1 is converted to an array, which is what restores an array that flatten turned into indexed paths. The input must be an object of paths: an array or a scalar is refused with a message rather than silently wrapped.

Rebuild nested JSON from dotted paths. A level whose keys are exactly 0..n-1 is restored as an array. Runs in your browser.

How to use it

Unflatten a JSON Object: paste the flat JSON into the box above, set Delimiter (default ".") and Indent (default 2), and press Run to get the nested JSON below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads flat JSON and returns nested JSON; reloading the page discards both.

What to Expect

Best for

  • Converting flat JSON to nested JSON when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

{ "user.name": "Ada", "user.roles.0": "admin", "user.roles.1": "author", "count": 3 }

Sample output

{ "user": { "name": "Ada", "roles": [ "admin", "author" ] }, "count": 3 }

Frequently asked questions

How do I use the unflatten a json object?

Unflatten a JSON Object: paste the flat JSON into the box above, set Delimiter (default ".") and Indent (default 2), and press Run to get the nested JSON below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.