JSON Flatten / Unflatten
Flatten nested JSON to dot-notation keys and unflatten back.
JSON input
Flattened
{
"user.name": "Alice",
"user.address.city": "NYC",
"user.address.zip": "10001",
"user.tags.0": "admin",
"user.tags.1": "user"
}Was this page helpful?
Related tools
About JSON Flatten / Unflatten
Flatten a nested JSON object into a single level of dot-notation keys (e.g. user.address.city), and unflatten it back. Handy for diffing configs, loading JSON into spreadsheets, or feeding flat key/value stores.
How to use
- Paste your nested JSON into the input.
- Choose flatten to expand nested keys into dot/bracket paths, or unflatten to rebuild the nested object.
- Copy the result for use in env files, spreadsheets, or feature-flag systems.
Frequently asked questions
- How are arrays handled?
- Array items become indexed keys such as items.0.name, so the path uniquely identifies every value.
- Can I convert flattened keys back to nested JSON?
- Yes — the unflatten mode reconstructs the original nested structure from dot-notation keys.