About JSON Unflattener
Exports from spreadsheets, key and value stores, environment files and translation tools often hold JSON as one flat object, each key spelling out a path. Paste that object here and the nested structure comes back: user.address.city becomes a city inside an address inside a user, and tags.0 and tags.1 become an array.
It reads separator paths with a dot, slash, underscore or double underscore, and bracket paths such as items[0]["unit price"]. Where two paths contradict each other, it names the one at fault instead of quietly dropping data.
How it works
- The document is read by a strict JSON parser that keeps numbers exactly as written and treats every key, even __proto__, as ordinary data.
- Every value that is not a non-empty object or array becomes one entry, keyed by the path to it. Empty objects and arrays are kept as values so nothing disappears.
- Unflattening splits each path into its parts and rebuilds the objects and arrays. A whole number in a path makes an array unless you turn that off; missing array items become null.
Questions
What does the input need to look like?
A single JSON object whose keys are paths and whose values are the values to place there, for example {"user.name": "Ana", "user.tags.0": "admin"}. Values may be anything JSON allows, including objects and arrays.
What happens to missing array positions?
If paths give items 0 and 2 of an array but not 1, the missing item is filled with null so the others keep their positions, and a warning says how many were filled.
Can a huge index like items.999999999 freeze the page?
No. An index far larger than the number of paths in the input would make an array of empty slots, so it is refused with a message naming the key.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.