Logo JSON Parser Online

Unflatten JSON to Nested Structure

Paste a flat JSON object with dot-notation keys and click Unflatten. The tool reconstructs the nested object — {"address.city": "London"} becomes {"address": {"city": "London"}}. Use it to reverse the output of the Flatten JSON tool, or to expand flat key-value configs into structured JSON.

All JSON Tools

28 tools

Free, fast, runs in your browser. No login needed.

Made with ❤️ in India · © 2025 parsejsononline.com
INPUT
1
OUTPUT
1
✅ Ready
Characters: 0
Ctrl+Enter to run
What is this tool?

How to use

  1. Paste your flat JSON object with dot-notation keys into the INPUT pane.
  2. Set the separator to match what was used during flattening (default .).
  3. Click Unflatten.
  4. The output is the reconstructed nested JSON.

How it works

The unflattener splits each key by the separator character and follows the resulting path to build a nested object. For example, the key user.address.city with separator . produces {"user": {"address": {"city": "..."}}}.

Separator must match. Use the same separator that was used when the object was flattened. If the original separator was __ or /, enter that in the separator field before unflattening.

Arrays are not reconstructed. If the flat object was produced from an array (with keys like items.0, items.1), those numbered keys will produce a nested object with string keys "0", "1" — not a proper JSON array. The Flatten JSON tool preserves arrays as-is, so this situation only arises if the flat input was produced by a different tool.

Path conflicts. If two keys share a path prefix where one extends further (e.g., a and a.b), the intermediate path is overwritten. The last key processed wins.

FAQ

What is the reverse operation?

The Flatten JSON tool. Use the same separator in both directions to round-trip your data correctly.

What if my keys contain the separator character?

Unflattening will split on every occurrence of the separator, including those inside original key names. Use a separator that does not appear in your key names, or switch to a different separator in both the flatten and unflatten steps.

Are arrays reconstructed from indexed keys like items.0?

No. Numeric path segments produce objects with string keys ("0", "1", ...) — not JSON arrays. The Flatten JSON tool on this site preserves arrays as values, so this is only an issue with flat data from external sources.

Is my data sent anywhere?

No. Unflattening runs entirely in your browser.

Related tools

Flatten JSONThe reverse operation — flatten nested JSON to dot notation. JSON FormatterFormat the unflattened output. JSON DiffCompare original and unflattened structures.