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

Your 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"
    }
  ]
}

The short answer

Flattening JSON turns a nested document into a flat list of records, one for each value or container, with a JSON Pointer path that says where it lives. Because every record keeps its type, empty objects and arrays and keys that look like numbers survive a round trip. The records can be turned back into the original JSON.

FormulaEach record = {path, type, value}, where path is a JSON Pointer such as /tags/0 and the root path is empty

Worked exampleThe sample {"name":"Ada","tags":["data","text"],"settings":{}} becomes 6 records: the root object, /name (Ada), the /tags array, /tags/0 (data), /tags/1 (text) and the empty /settings 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. The records appear as you type. 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. If you use Copy link, what you entered is placed in the link.

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.

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

All 220 SnowRock tools