Advertisements

headerup to 320x100 / 728x90

JSON Unflatten

Rebuild nested JSON from a flat map of dotted keys and array-index paths

Separator:
Input
Loading editor...
Output

Output will appear here...

Advertisements

content bottomup to 300x250

What is JSON Unflatten

Last reviewed:

JSON (JavaScript Object Notation) is a lightweight, human-readable data format used almost everywhere on the web for APIs, config files, and log output.

JSON Unflatten takes a flat map like `{ "user.id": 1, "user.tags[0]": "admin" }` and rebuilds the original nested object structure.

Pair it with JSON Flatten for lossless round-trips between nested and flat representations.

Why use it

  • Restore structure after KV-store hydration.
  • Rebuild JSON from dotted-config files.
  • Merge flat diff outputs back to nested form.
  • Teach path-based JSON navigation.
  • Undo a JSON Flatten transformation.

Features

  • Inverse of JSON Flatten
  • Handles nested objects + arrays
  • Custom separator
  • Configurable round-trip
  • Zero-upload JSON Unflatten pipeline, nothing touches a server

How to use JSON Unflatten

  1. Paste flat JSON. Dotted / bracketed keys.
  2. Match separator. Use the same separator as when flattening.
  3. Run. Copy the rebuilt nested JSON.

Example (before/after)

Flat JSON

{
  "user.id": 1,
  "user.tags[0]": "admin",
  "user.tags[1]": "ops"
}

Nested JSON

{
  "user": {
    "id": 1,
    "tags": ["admin", "ops"]
  }
}

Common errors

Separator mismatch

The unflatten separator must match the flatten.

Fix: Use the same separator in the toolbar.

Conflicting paths

`a` and `a.b` in the same flat map are ambiguous.

Fix: Remove conflicting keys before unflattening.

FAQ

Is it the inverse of JSON Flatten?

Yes — with the same separator it round-trips losslessly.

How are arrays detected?

By bracketed numeric indices like `tags[0]`.

Does it handle deeply nested paths?

Yes — there's no practical depth limit.

Is input uploaded?

No — unflattening is client-side.

Is the output sorted?

Keys follow the insertion order of the input map.