JSON Flattener
Flatten nested JSON into key paths and rebuild the original structure.
The JSON Flattener converts nested objects and arrays into flat key-value pairs using dot or underscore separators. It can also rebuild nested JSON from flattened keys, including bracket-style array paths.
Mode
Please enter some input.
How to use
- Choose Flatten or Unflatten mode.
- Select the separator and array style.
- Paste JSON and read the converted result.
Frequently asked questions
How are arrays represented when flattened?
Bracket style uses names like items[0]; dot style uses names like items.0.
Can flattened data be restored?
Yes, Unflatten mode rebuilds objects and arrays from the paths.
What happens on path collisions?
Flattening stops with an error when two keys would produce the same path.
Related tools
JSON Formatter
Format, validate and minify JSON in one place.
XML Formatter
Pretty-print and indent XML documents.
YAML Formatter
Format YAML and convert between YAML and JSON in both directions.
CSV to JSON
Convert CSV tables into JSON data.
JWT
Encode, decode and verify JSON Web Tokens locally.
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes.
Rate this tool
Your rating