JSON Flatten / Unflatten
Turn nested JSON into flat keys such as a.b.0 and rebuild it. Choose the separator and array style and limit the depth. Private.
More options
JSON
Stays in your browserResult
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to JSONPath Tester or JSON to CSV.
Free Online JSON Flatten / Unflatten
Flat key-value JSON is easier to put in a spreadsheet, a .properties file or an environment. This tool flattens nested JSON and rebuilds it from the flat form. It gives developers a quick browser-based way to solve a focused json flatten / unflatten task before moving the result into a project.
How to use JSON Flatten / Unflatten
Paste your code in the box on the left, or open a file, then press Convert. Choose Flatten or Unflatten, then the separator. Keys that already contain the separator are written in bracket form so nothing is lost.
Common mistakes
- Using a separator that appears in your keys: choose another one.
- Unflattening keys such as a.0 and expecting an object: numbers become array positions.