Skip to content
Free data tool

Reversible JSON flattener

This flattener turns nested JSON into a flat list of records, one for each value, with its path and type. It helps you review deeply nested data, compare structures and move JSON through systems that prefer flat rows.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

51 characters

Result

{
  "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"
    },
    {
      "path": "/tags/1",
      "type": "string",
      "value": "text"
    },
    {
      "path": "/settings",
      "type": "object"
    }
  ]
}

Example

Input
{"name":"Ada","tags":["data","text"],"settings":{}}
Result
{
  "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"
    },
    {
      "path": "/tags/1",
      "type": "string",
      "value": "text"
    },
    {
      "path": "/settings",
      "type": "object"
    }
  ]
}

How to use the reversible json flattener

  1. Paste your JSON into the JSON box.
  2. Press Run. This tool has no extra settings.
  3. Review the records in the result.
  4. Press Copy result or Download to keep them for the JSON unflattener.

How it works

Each record has a path, a type (object, array, string, number, boolean or null) and, for single values, the value itself.

Paths use JSON Pointer format, like /tags/0 for the first item in tags. The root record has an empty path.

Objects and arrays get their own records, so empty containers and keys that look like numbers survive a round trip.

The output is wrapped in an object marked json-pointer-records-v1, which the JSON unflattener reads back.

The input follows strict JSON rules, so duplicate keys and numbers that would lose precision are rejected.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

What does it mean to flatten JSON?

Flattening turns a nested structure into a simple list where each value sits next to the path that leads to it. It makes deep data easier to scan, search and compare.

Does it use dot notation like user.name?

No. It uses JSON Pointer paths like /user/name, which handle dots, slashes and array positions without confusion.

Can I turn the flattened records back into JSON?

Yes. Paste the full result into the JSON unflattener to rebuild the original structure.

Is my JSON uploaded?

No. Flattening is done locally in the browser, and your data is not sent anywhere.

All 100 SnowRock tools