Category: Developer tools

JSON Flattener

System ideaMissing a tool?

Flatten nested JSON into path = value rows, or rebuild it

Flatten a nested JSON document into one path = value row per leaf, using dot and bracket notation like a.b[0].c, or rebuild nested JSON from a list of path = value rows. Runs entirely in your browser.

5 rows

Flattened rows
name = "Ada Lovelace"
address.city = "London"
address.country = "UK"
skills[0] = "Analysis"
skills[1] = "Mathematics"

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Deeply nested JSON is hard to scan, diff or paste into a spreadsheet one field at a time. This tool walks the document and, for every leaf value, prints the full path used to reach it, in the same dot/bracket notation used by most scripting languages, so users[0].email becomes one line you can search or copy. The reverse direction takes that same row format and rebuilds the nested object or array, creating each intermediate object or array as needed. Nothing is ever evaluated as code: paths are parsed as plain text.

How to use it

  1. Choose Flatten or Unflatten.
  2. Paste nested JSON, or path = value rows, or load the example.
  3. Copy the flattened rows or the rebuilt JSON.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my JSON uploaded anywhere?
No. Flattening and rebuilding happen in JavaScript running in the page, so your data never leaves your device.
Does this use eval to rebuild the JSON?
No. Each path is parsed by hand into keys and array indexes, and values are only ever read with JSON.parse, never executed.
What happens to empty objects and arrays?
An empty object or array has no leaf value to flatten, so it is kept as its own row with {} or [] as the value, and restored the same way.