JSON · DATA CONVERTER

JSON Unflatten

Rebuild a nested JSON object or array from flat path keys. Match the separator and array notation used by JSON Flatten; conflicting paths are reported rather than silently overwritten.

Local processing · Exact JSON number tokens · Dot and bracket arrays
Flatten first? Open JSON Flatten →For best results, use the same separator and array style on both tools.
Flat JSON input
Nested JSON output
Paths: 0 Objects: 0 Arrays: 0 Output: 0 B
2 MB input limit · Runs locally

Dot-index mode treats numeric path segments as array indexes, so a numeric object key can be ambiguous. Flat paths cannot reveal whether an original key contained the chosen separator; choose the same separator used by the flattener.

How JSON Unflatten works

Each flat key is split into path segments and assembled into nested objects or arrays. For example, users.0.name becomes an array item in dot-index mode, while users[0].name uses explicit bracket notation. The separator and array style controls should match the settings used by JSON Flatten.

Empty arrays and objects provided as values remain intact. Parent/child collisions, mixed object/array paths, and arrays with missing indexes stop with an explanatory error instead of losing data. JSON numbers are preserved exactly, including integers larger than JavaScript can represent safely.

Path compatibility notes

  • Paste the flat JSON output from JSON Flatten; key=value and CSV exports are not accepted directly.
  • Object keys containing the chosen separator are ambiguous because the flat format has no escape convention for them. Bracket style also reserves […] for array indexes.
  • In dot-index mode, a segment such as 0 means array index zero. Use bracket style when you need to make array indexes explicit.
  • Array indexes must start at zero and be consecutive. Sparse paths such as items.0 and items.2 are rejected.
  • Input is limited to 2 MB and processed in a dedicated Web Worker; nothing is uploaded or stored.

JSON Unflatten FAQs

Choose the same settings used to flatten the source. For example, users.0.name uses a dot separator and dot-index arrays; users[0].name uses bracket-index arrays with a dot between object keys.

Paths that assign both a value and children to the same location, mix object keys with array indexes, or leave gaps in array indexes are ambiguous or invalid as JSON arrays. The tool stops instead of overwriting entries.

Yes. The converter preserves JSON numeric tokens during parsing and output, so a value such as 12345678901234567890 is not rounded by JavaScript number conversion.

No. The conversion runs in a Web Worker in your browser. The page does not upload or save the input.