JSON Flatten & Unflatten
Convert nested JSON objects into flat key paths or rebuild flat paths into nested JSON instantly. Useful for forms, databases, config files, analytics, and data pipelines.
- Flatten nested objects
- Restore nested structure
- Choose path separator
- Private browser processing
Turn nested objects into path-based keys.
user.namePaste JSON input and run conversion.
JSON Flatten & Unflatten Online
Flatten nested JSON into path-based keys or rebuild flat paths into nested objects instantly. Ideal for forms, config systems, spreadsheets, analytics, and data transformation workflows.
Where Is This Useful?
How to Use
- Choose Flatten or Unflatten.
- Select a path separator (dot, underscore, or slash).
- Paste JSON input.
- Click Run (or press Ctrl+Enter).
- Copy or download the result.
Example
Flatten: nested object to flat keys:
{ "user": { "name": "Alice" } }{ "user.name": "Alice" }Unflatten: flat keys back to nested JSON:
{ "user.name": "Alice" }{
"user": {
"name": "Alice"
}
}Features
- Flatten & unflatten modes
- Configurable separators
- Instant browser processing
- Copy or download output
- Mobile friendly
- Clean formatted results
Frequently Asked Questions
Is this free?
Yes. The tool is free to use with no sign-up.
Is my data uploaded?
No. Flattening and unflattening run entirely in your browser.
What does flatten JSON mean?
It means turning nested objects into a single object whose keys encode the path, such as user.address.city.
What does unflatten mean?
It rebuilds nested objects from those path keys, using the separator you choose to split segments.
Can I choose separator characters?
Yes. Use dot, underscore, or slash—the preview in the tool shows how paths look.
What if keys conflict?
If two paths disagree (for example a value and a child path at the same segment), the tool reports a duplicate path conflict so you can fix the JSON.
Does it work on mobile?
Yes. Editors are sized for touch, mode switching is full-width, and copy/download are in an output sheet.
Can I download the result?
Yes. Download flattened.json or nested.json from the toolbar or mobile menu.
Related Tools