Flatten and restore JSON
Flatten nested JSON into reversible JSON Pointer paths, or restore a dot-key map as nested objects.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Flatten nested JSON into a path map that can be restored in the same workspace. Restore a conventional dot-key map when your input came from another system. The reversible output records container types so empty arrays, numeric object keys and large number tokens survive the round trip.
How to use this tool
- Choose Flatten, Restore JSON, or Restore dot-key map above the input; paste JSON or select a UTF-8 .json file.
- Review the detected container and leaf counts, then run the conversion.
- To verify a round trip, select ‘Use result as restore input’, restore it and save the complete JSON.
Supported inputs and limits
Keep both containers and values maps for restoration; a values-only map loses empty containers and array types.
JSON preserves numeric lexemes and rejects duplicate keys; check the field structure expected by your target system.
Restoration preserves JSON values and container types, but whitespace and object-key order may change.
Files and input are processed in this browser. No account needed.
Restore JSON accepts this tool’s containers/values envelope. Restore dot-key map accepts scalar values and creates objects only; dots in literal key names and array types are ambiguous. Input is limited to 200,000 JSON nodes and 128 nesting levels.
Worked example
Example input
{"user":{"id":9007199254740993}}Example options
{}Example output
{
"containers": {
"": "object",
"/user": "object"
},
"values": {
"/user/id": 9007199254740993
}
}When something does not work
Keep the complete containers/values output for exact restoration. If validation fails, check JSON syntax, the selected restore mode, path conflicts and consecutive array indexes in envelopes.
Frequently asked questions
How do I restore flattened JSON?
After flattening, select ‘Use result as restore input’ and run Restore JSON. For an ordinary flat object such as {"person.name":"Joe"}, choose Restore dot-key map.
How can I check the result from Flatten JSON?
Check sample JSON Pointer paths and counts, then restore the complete envelope to verify empty containers, numeric object keys and large integers.
What should I check before using the result?
Flatten produces a reversible envelope, not a conventional dot-key map. Dot-key restore cannot recover arrays, empty containers, or literal dots in key names; inspect the resulting structure.
Is my input sent to a server?
No. Tool input is processed in your browser, not sent to a server. Temporary workspaces stay in the same tab and are cleared by a refresh or tab closure. Save the results you need.