JSON Flatten / Unflatten
Flatten nested JSON objects into dot-notation keys or unflatten keys back to objects.
JSON Flatten / Unflatten
About JSON Flatten / Unflatten
The JSON Flatten & Unflatten Studio converts deeply nested JSON object trees into single-level flat key-value pairs using dot notation (`user.address.city`) or bracket notation (`user[address][city]`) and reconstructs flat records back into nested objects.
How to Use JSON Flatten / Unflatten
Step 1
Paste your JSON into the input pane.
Step 2
Select conversion action (Flatten or Unflatten).
Step 3
Select your preferred key delimiter (e.g. `.` or `_`).
Step 4
Click "Copy Result" or "Download .json".
Practical Use Cases for JSON Flatten / Unflatten
Database Export & CSV Normalization
Flatten deeply nested MongoDB and Firebase NoSQL document trees into 1-dimensional row objects for CSV and SQL table exports.
Form Key-Value State Binding
Convert nested application state objects into flat dot-notated input name fields for HTML forms.
Input & Output Examples
Flattening Nested User Profile
{"user": {"name": "Alex", "contacts": {"email": "alex@test.com"}}}{\n "user.name": "Alex",\n "user.contacts.email": "alex@test.com"\n}Key Features & Performance
- ✓Bidirectional: Flatten nested JSON to dot-notated keys and Unflatten dot keys back into nested trees.
- ✓Supports custom delimiters: Dot (`.`), Slash (`/`), Underscore (`_`), or Bracket (`[ ]`).
- ✓Properly handles array index flattening (`items.0.name` vs `items[0].name`).
- ✓100% Client-Side memory execution guarantees data privacy.
- ✓1-Click Copy and 1-Click `.json` export.
Key Terminology & Definitions
Dot Notation Key Path
A string representation of a nested object hierarchy where each child property level is separated by a period (e.g. `config.database.port`).
Deep Unflattening
The reverse transformation of parsing delimiter-separated key strings and allocating intermediate nested objects and arrays.
