Structured Data

Nested Data Flattener

Turn nested JSON into a flat list of paths such as user.address.city, or rebuild nested JSON from flat paths. Copy the result or download it — your data never leaves the page.

Runs in your browser v1.0.0

Direction & options

updates live

Flatten finds every leaf in your data and lists its full path. Reconstruct does the reverse: paste a flat JSON object of paths and it rebuilds the nested structure. Numeric path segments such as items.0 become arrays.

Input

nested JSON

Paste nested JSON to flatten, or a flat JSON object of paths to reconstruct. Your input is parsed in the browser and is never uploaded.

Output

ready


                

How it works

Flatten walks your JSON with the browser’s own JSON.parse() and records each leaf as a path. Objects extend the path with a separator, arrays use their index, and empty objects and arrays stay as {} and [] so nothing is lost. Reconstruct splits each flat key back into segments and rebuilds the tree; a node whose keys are the consecutive numbers 0, 1, 2… is turned into an array. Paths that disagree with each other, such as a and a.b, are reported instead of silently overwriting data. The optional share link keeps everything in the URL fragment, which never leaves your browser.