JSON Flattener — Flatten JSON Online
Flatten nested JSON objects and arrays into a single-level object with path-based keys such as user.name. This JSON flattener runs locally in your browser and supports dot notation, bracket notation, and custom separators.
Arrays and empty values
Arrays can use dot notation like users.0.name or bracket notation like users[0].name. Empty objects and arrays are preserved at their path.
Separator ambiguity
Flattened formats are ambiguous when original object keys contain the separator. Choose a separator that does not appear in your keys when you need a reversible result.
Privacy
Flattening happens in your browser and does not send JSON to the server.
FAQ
Can arrays be flattened?
Yes. Array indexes are included in the generated paths, using dot notation such as users.0.name or bracket notation such as users[0].name when that option is selected.
What does flattening JSON mean?
Flattening JSON converts nested objects into a single-level object whose keys represent the original paths.
How do I flatten JSON online?
Paste JSON into the input, choose the separator and array handling if needed, and the flattened JSON is generated locally in your browser.
Can I flatten nested JSON arrays?
Yes. Nested arrays are flattened recursively. With dot notation, indexes appear as numeric path segments like users.0.roles.1. With bracket notation, indexes appear in brackets like users[0].roles[1].