Home
Watchdroid
Mail Blackhole
JSON Formatter
JSON Viewer
JSON Compare
JSON Repair
JSON Escape & Unescape
JSONPath Tester
JSON Converter
JSON to JSON Schema
JSON to Code
JSON to TypeScript
JSON to Zod Schema
JSON Schema to Code
JSON Flatten & Unflatten
OpenAPI & Swagger Validator
blackdroid.dev

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.