JSON Flatten & Unflatten
Flatten JSON with escaped pointer paths and explicit container types. Restore arrays, numeric object keys and empty containers without ambiguity.
How to use
The output contains $format, containers and values. containers records object or array for each JSON Pointer path; values stores scalar leaves. This explicit envelope prevents a numeric object key from being mistaken for an array index.
An empty path means the root. Slashes and tildes in keys use ~1 and ~0. Empty objects and arrays remain container entries even when they have no leaves. Original number tokens are retained in both directions.
Behavior and limits
Unflatten expects json-pointer-flat/v1 output from this tool, not arbitrary dot-separated maps. Missing parents, conflicting paths and sparse arrays are errors. Limits: 64 levels, 20,000 nodes and 200,000 input/result characters.
Questions & answers
Will dots in a key create nested objects?
No. Dots are ordinary key characters; only the declared JSON Pointer structure defines nesting.
Is my input sent to a server?
No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.