Skip to content
Free data tool

JSON record unflattener

The JSON unflattener is the reverse of the JSON flattener. It takes the flat path records and rebuilds the original nested JSON, checking the records carefully instead of guessing.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

205 characters

Result

{
  "name": "Ada",
  "tags": [
    "data"
  ]
}

The short answer

Unflattening rebuilds the original nested JSON from a list of path, type and value records. Each path is a JSON Pointer, and a numeric segment such as /tags/0 builds an array position when the parent record says it is an array. The records must come from the matching flattener format.

FormulaStart from the root record, then place each record's value at its JSON Pointer path

Worked exampleThe 4 sample records (root object, /name Ada, the /tags array and /tags/0 data) rebuild the object {"name":"Ada","tags":["data"]}.

Example

Input
{"format":"json-pointer-records-v1","records":[{"path":"","type":"object"},{"path":"/name","type":"string","value":"Ada"},{"path":"/tags","type":"array"},{"path":"/tags/0","type":"string","value":"data"}]}
Result
{
  "name": "Ada",
  "tags": [
    "data"
  ]
}

How to use the json record unflattener

  1. Paste the records into the JSON Pointer records from JSON flattener box.
  2. Check that the outer object still has its format and records fields.
  3. The rebuilt JSON appears as you type. Press Run any time to refresh it.
  4. Press Copy result, or Download to save it.

How it works

The input must be an object with format set to json-pointer-records-v1 and a nonempty records list, as made by the JSON flattener.

Records can be in any order. A root record with an empty path is required, and every other record needs an object or array parent.

Each record may only have path, type and value. Objects and arrays have no value, and other values must match their stated type.

Duplicate paths, bad pointer escapes and arrays with missing positions are rejected. Array positions must be whole numbers under 100,000.

Paths can be at most 100 levels deep.

Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.

Questions and answers

How do I unflatten JSON?

Flatten your data with the JSON flattener, edit the records if needed, then paste them here. The nested JSON is rebuilt from the paths.

Can I unflatten dot notation keys like a.b.c?

No. This tool only reads the JSON Pointer record format made by the JSON flattener.

Why do I get a sparse array error?

An array is missing one of its positions, such as /tags/0 and /tags/2 without /tags/1. Add the missing record or make the parent an object.

Is my data uploaded?

No. The records are rebuilt in your browser, and nothing is sent over the network.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools