Dot path keys back to nested objects and arrays
JSON Flatten
Turn deeply nested JSON into simple key and value pairs for spreadsheets, translation files or environment settings.
Loading tool…
How to use json flatten
Paste nested JSON or open a file.
Choose the separator, such as a dot, underscore or slash.
Pick .0 or [0] for array positions and whether to keep empty objects.
Copy or download the flat JSON.
What this tool does
- Any separator, including multi-character ones like __ for environment variable style keys.
- Arrays as user.roles.0 or user.roles[0].
- Keeps empty {} and [] as values so nothing disappears silently.
- Warns when an original key already contains the separator, which would make the result ambiguous.
How the result is verified
The flat result is unflattened again and compared with your original JSON. The tick only shows when the round trip is exact.
Frequently asked questions
Can I get the nested JSON back?
Yes. Switch to Unflatten and the flat output becomes the input. With empty objects kept and no separator inside your keys, the round trip is exact.
What separator should I use for environment variables?
Use a double underscore (__), which many config libraries read as a nesting marker, and turn on [0] style only if your loader expects it.
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
Flatten JSON arrays into spreadsheet rows with dot path columns
Beautify or minify JSON with your choice of indentation
Live JSONPath queries with filters, slices and match paths
Collapsible, searchable tree view that stays fast on large files