JSON Flatten & Unflatten
Flatten nested JSON to dot/bracket keys online — or unflatten flat keys back to nested objects and arrays. Custom separators, lossless round-trip, no upload.
Flattened JSON
{
"user.name": "Ada",
"user.address.city": "London",
"user.address.zip": "SW1Y",
"user.roles[0]": "admin",
"user.roles[1]": "editor",
"active": true
}About JSON Flatten & Unflatten
Flatten turns nested objects and arrays into a single-level map like "a.b[0].c": value — choose the key separator and whether arrays become a[0], a.0 or stay as leaf values. Empty objects and arrays are preserved as leaves.
Unflatten reverses it: numeric key segments become arrays automatically (a[0], a.0 and mixed forms all work), conflicting paths are reported, and a flatten→unflatten round-trip restores the original document exactly. Everything runs locally in your browser.