What Is JSON Unflattening?
JSON unflattening converts dot-notation flat keys back into nested object structures. For example, {user.name: "Alice"} becomes {user: {name: "Alice"}}. This is essential when restoring API-compatible formats from flat data.
Unflattening is useful for:
- API Migration: Restoring nested formats after data processing.
- Config Restoration: Converting env-style flattened configs back to structured JSON.
- Database Export: Restoring nested documents from flat relational exports.
How to Unflatten JSON Online
- Paste flat JSON: Enter your dot-notation key-value pairs.
- Click Unflatten: Restore the nested object structure.
- Review nesting: The output shows the restored hierarchy.
Frequently Asked Questions
What key separators are supported?
Dot notation (.) and bracket array notation (e.g., items[0]) are both supported.
Can nested arrays be restored?
Yes. Numeric keys in bracket notation are converted back to array elements.
Is this tool safe?
Yes. Processing is 100% client-side in your browser.
Related Tools
- Nested to Flat JSON — Reverse conversion from nested to flat
- JSON to Key-Value — Convert JSON to key:value pairs