Flatten and unflatten JSON
Turn nested JSON into flat keys like user.name, or rebuild the nesting from flat keys.
Nested JSON
Loading editor…
Flat keys
Loading editor…
Dot paths and array indexes
Flattening turns {"user": {"name": "Ada"}} into one entry called user.name with the value "Ada". Array items get an index in the name, written as a[0] or as a.0 depending on the option. The separator is one character, so you can choose any single mark.
Collisions
Two different paths can join to the same name. With a dot separator, {"a.b": 1} and {"a": {"b": 2}} both become a.b. The tool checks for these collisions before it writes output.
More JSON tools
All JSON toolsWas this tool useful?