Free · No signup · Runs in your browser

JSON Flatten

Turn deeply nested JSON into a flat list of path = value lines you can grep, diff, or drop into a spreadsheet — computed client-side.

01 · How it works

Three steps, then done.

Paste a JSON object or array. The tool walks every nested key and array index, joining them into a single path per leaf value, then prints one path and its JSON scalar per line.

1

Paste your JSON

Drop in any valid JSON object or array. Nested objects, arrays, and mixed structures of any depth are all handled.

2

Pick path style

Choose a dot or slash delimiter for object keys, bracket [i] or dotted .i notation for array indexes, and the separator between path and value.

3

Copy or download

Each leaf becomes one path = value line. Copy the flattened list to your clipboard or download it as a .txt file — nothing ever leaves your machine.

02 · Why ours

Why flatten JSON to key pathskey paths

A flat path-per-line view makes nested JSON easy to scan, diff, and search with ordinary line-based tools.

  • 01

    Fully client-side

    Your JSON is parsed and flattened in the browser with the built-in JSON engine. There is no upload and no server round-trip, so even sensitive payloads stay on your machine.

  • 02

    Greppable and diffable

    One path per line turns a sprawling nested document into plain text you can search with a regex, diff between two versions, or paste into a spreadsheet column.

  • 03

    Faithful scalar values

    Leaf values are rendered as JSON scalars, so strings stay quoted while numbers, booleans, and null appear bare — no ambiguity about what each value actually is.

  • 04

    Configurable notation

    Switch between dot and slash delimiters and bracket or dotted array indexes to match the path syntax your config loader, query tool, or teammate expects.

"Every leaf of a nested document, named by its full path, one line at a time."
csvtodashboard.com
03 · FAQ

json flatten questions.

How are array elements named?
By their index. With bracket notation an element reads items[0].sku; with dotted notation it reads items.0.sku. The index follows the array's order in the source JSON.
They are treated as leaves. An empty object is printed as its path = {} and an empty array as its path = [], so they still appear in the flattened output instead of vanishing.
As JSON scalars, which means strings keep their surrounding quotes (name = "Ada") while numbers, booleans, and null are written without quotes. This keeps the value type unambiguous.
You'll see a short error describing the parse problem, including the position the JSON engine choked on, instead of any output. Fix the JSON and the flattened list appears immediately.
Yes. The Assignment field controls the text placed between each path and its value. It defaults to " = " but you can set it to ": ", "\t", or anything else that suits your downstream tool.