Code Beautify / MULTIVERTO

Unflatten JSON object

Rebuild nested JSON objects from JSON Pointer path keys.

Live converterYour input stays in this browser. No text is uploaded for conversion.

The file stays in your browser.
Chain tools

Apply each text tool to the previous result. Text workflows ↗

Only the recipe name and tool order are saved in this browser. Your input and results are never saved.

01 / Example

Example

Your input{"/user/name":"Hello","/user/message":"Welcome","/active":true}
Result{ "user": { "name": "Hello", "message": "Welcome" }, "active": true }

02 / Guide

Unflatten JSON object — How it works

What the conversion does

Rebuild nested JSON objects from JSON Pointer path keys. Decode each pointer token and create missing parent objects.

Worked example

The sample input is {"/user/name":"Hello","/user/message":"Welcome","/active":true}; its converted form is { "user": { "name": "Hello", "message": "Welcome" }, "active": true }.

Format rules and limits

An empty root object is represented by an empty path holding an empty object. This deliberately restricted mapping makes a round trip predictable for supported objects. Compare output against the original before using it as a database update: a slash in an ordinary key must be escaped, and a path that points inside an existing scalar cannot be reconstructed. Rebuild an object after editing path-based configuration values, keeping each slash-separated segment as a distinct parent or child key. Supply an object of path-to-value pairs, not a list of paths or a complete JSON Pointer document. The operation creates only objects between the root and leaf; it does not infer arrays from numeric tokens such as /items/0. A path must begin with a slash, except the special empty path that stands for an empty root object. Duplicate or overlapping destinations cannot be resolved by entry order. Check the restored hierarchy before importing it because a misplaced slash changes which property receives the value.

Check the result

Supply both /a and /a/b to test a conflict: a leaf cannot also be the parent of another path. The tool must reject that input. Before accepting the rebuilt object, check whether any source paths were prefixes of other paths. A location cannot simultaneously hold a leaf value and contain child properties. Numeric-looking tokens remain object keys; they do not create array slots. Inspect the final hierarchy instead of relying on the number of input pairs, since a path typo can put a valid value under the wrong parent. If the target application expects arrays, represent them as complete leaf values in the flat input. Keep the flat map alongside the output while debugging conflicts. Check the shape you want to restore before pasting path-value pairs. A path that names an object cannot simultaneously name a scalar leaf, and a numeric-looking segment may need explicit treatment according to the source representation. Rebuild a small branch first, then inspect arrays, empty containers and keys that include a slash or tilde. The reconstructed document can be valid JSON while differing from the original schema, so compare the tree rather than just the number of entries. Preserve the flat mapping until you have verified that no path was overwritten or merged unexpectedly.

How this conversion transforms the input
JSON — Input
Read and transform structure
JSON — Result

Explore guides

Conversion guides

Explore guides