Nested JSON to one level of dot path keys, and back
JSON Unflatten
Turn a flat key list from a spreadsheet, form or translation file back into structured JSON.
Loading tool…
How to use json unflatten
Paste an object whose keys are paths, such as {"user.name": "Asha"}.
Set the separator your keys use.
Choose whether number segments become array positions.
Copy or download the nested JSON.
What this tool does
- Reads both items.0.name and items[0].name styles.
- Names the exact two keys that conflict, such as a holding a value while a.b needs it to be an object.
- Fills gaps in array positions with null and tells you how many.
- Safe with unusual keys such as __proto__, which are stored as plain data.
How the result is verified
The nested result is flattened again and compared with your input keys and values; the tick appears when they match exactly.
Frequently asked questions
What if two keys conflict?
The tool stops and names both keys, for example when "a" is 1 and "a.b" is 2, because one value cannot be both a number and an object.
Can I keep numeric keys as object keys?
Turn off 'Number segments make arrays' and a key like codes.404 becomes {"codes": {"404": ...}}.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Beautify or minify JSON with your choice of indentation
Turn CSV rows into a JSON array of objects, with types and nesting
Collapsible, searchable tree view that stays fast on large files