JSON Flattener
Flattens nested JSON objects and arrays into a single-level object with dot/bracket-notation keys, or reconstructs nested JSON from flat keys in reverse. Nothing leaves your browser.
About This Tool
Deeply nested JSON (API responses, config trees, event payloads) is awkward to search, diff, or load into flat systems like spreadsheets or key-value stores. Flattening collapses every leaf value into a single-level object whose key spells out the original path, such as a.b[0]. Unflatten runs the same logic in reverse, rebuilding the nested structure from flat keys.
Both directions round-trip exactly: flattening a value and then unflattening the result reproduces the original structure, including empty objects and arrays.
Key Features
- Bidirectional: One Direction dropdown (or the swap button) switches between Flatten and Unflatten.
- Configurable delimiter: Dot (.) or slash (/) between object key segments.
- Two array notations: Bracket style (a[0]) or dot style (a.0).
- Exact round-trips: Flatten then unflatten reproduces the original value, including empty {} and [] leaves.
- File upload & drag-and-drop: Load a .json or .txt file directly.
- Keyboard-driven: Cmd/Ctrl+Enter to convert, Cmd/Ctrl+Shift+C to copy output.