TextArray
100% local

JSON flattener

Flatten nested JSON into single-level dot-notation keys, or rebuild the nesting.

Input
Output

JSON flattener

Paste a deeply nested JSON object and this tool flattens it into a single-level object whose keys spell out the full path — user.address.city instead of three levels of braces. Flat JSON drops straight into spreadsheets and CSV exports, makes two API responses easy to diff line by line, and matches the key format that log pipelines, analytics events and configuration stores expect.

Two options control the key format. The delimiter (a dot by default) joins nested object keys, and array indices are written either in bracket style, tags[0], or with the delimiter, tags.0 — pick whichever your target system uses. Empty objects and arrays are kept as {} and [] values, so nothing silently disappears from the data.

The same options drive the reverse direction: switch the mode to unflatten and a flat object is rebuilt into nested JSON. Flatten a response, edit a handful of values in the flat view where paths are easy to scan, then unflatten it back — the round trip preserves the structure, including arrays and empty containers.

Invalid input is reported the same way as in the JSON formatter, with the parser's own message, and the tally under the output counts the flat keys, the nesting depth and the output size in bytes. Everything runs locally in your browser: API responses, config files and exports with real customer data never leave your device.

FAQ

How are arrays handled?
Each element gets its index in the key: tags[0], tags[1] in bracket style, or tags.0, tags.1 when you choose the delimiter style. Nested arrays and objects inside arrays work the same way.
Can I turn flat JSON back into nested JSON?
Yes. Switch the mode to unflatten and keys are split on the delimiter and bracket indices to rebuild the original structure. Use the same delimiter and array settings as when flattening.
What happens to empty objects and arrays?
They are kept as {} and [] values under their path, so a flatten and unflatten round trip returns the exact structure you started with.
Is my JSON uploaded anywhere?
No. The tool runs entirely in your browser and your data never leaves your device — safe for API responses and configs that contain real user data.