JSON flatten and unflatten
Flatten nested JSON to dot-path keys such as user.tags[0], or turn flat keys back into nested JSON.
Missing a feature or found a bug in JSON flatten and unflatten? Tell me on X (@_andrewtran) or by email.
How to use JSON flatten and unflatten
- Choose Flatten or Unflatten.
- Paste your JSON in the input pane.
- Copy the result or download it as a file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
How are lists written?
With an index in square brackets, such as items[0].name. Keys that contain a dot are written in brackets and quotes.
Does unflatten undo flatten exactly?
Yes. Empty objects and empty lists are kept as values, so nothing is lost on the way back.
Related tools
JSON escape and unescape
Turn text into a JSON string literal with quotes and line breaks escaped, or turn one back into text.HTML entity encoder
Escape text as HTML entities, or decode entities such as & and ' back into characters.Text to hex converter
Convert text to hexadecimal UTF-8 bytes, or decode hex back into text.Text to binary converter
Convert text to 8-bit binary, or decode binary back into text.