Key Facts
- Category
- Data Processing
- Input Types
- textarea, select, text, checkbox
- Output Type
- json
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The JSON Unflattener tool allows you to instantly convert flattened key-value pairs or dot-notation strings back into structured, nested JSON objects. It is designed to help developers and data analysts reconstruct complex data hierarchies from flat exports, CSVs, or configuration files with ease.
When to Use
- •Reconstructing nested JSON objects from flat database exports or CSV files.
- •Converting dot-notation configuration strings into readable hierarchical JSON structures.
- •Standardizing inconsistent data formats by parsing flattened keys into a clean, nested schema.
How It Works
- •Paste your flattened data into the input area and select your input format (JSON or Key=Value).
- •Choose the appropriate key format (e.g., Dot Notation, Bracket, or Path) to match your input structure.
- •Configure data type inference and array detection settings to ensure the output matches your expected schema.
- •Click process to generate and download your fully nested, structured JSON object.
Use Cases
Examples
1. Reconstructing User Profiles
Backend Developer- Background
- I received a flat list of user attributes from a legacy database export where keys were stored as 'user.profile.name' and 'user.profile.age'.
- Problem
- The application requires a nested JSON object to process the user data correctly.
- How to Use
- Input the key-value pairs, set the Key Format to 'Dot Notation', and select 'Auto' for data type inference.
- Example Config
-
Input Format: Key=Value, Key Format: Dot Notation, Type Inference: Auto - Outcome
- The tool outputs a clean, nested JSON object: { "user": { "profile": { "name": "John", "age": 30 } } }.
2. Parsing Configuration Arrays
DevOps Engineer- Background
- I have a flat list of server settings using bracket notation like 'servers[0].ip' and 'servers[1].ip'.
- Problem
- I need to convert these flat strings into a structured JSON array for a deployment script.
- How to Use
- Paste the lines, set Key Format to 'Bracket', and enable 'Bracket Keys' in the Array Detection settings.
- Example Config
-
Input Format: Key=Value, Key Format: Bracket, Array Detection: Bracket Keys - Outcome
- The tool generates a valid JSON array containing the server objects, ready for use in the deployment pipeline.
Try with Samples
jsonRelated Hubs
FAQ
What input formats are supported?
You can provide input as a flat JSON object or as a list of Key=Value pairs, one per line.
How does the tool handle arrays?
The tool supports numeric keys (e.g., user.0, user.1) or bracket notation (e.g., user[0], user[1]) to automatically detect and reconstruct arrays.
Can it automatically detect data types?
Yes, the 'Auto-detect' and 'Smart' inference modes automatically convert strings into numbers, booleans, or null values where applicable.
What happens if there are conflicting keys?
You can choose a merge strategy: override the existing value, merge objects/arrays, or trigger an error if a conflict is detected.
Is my data processed on a server?
The tool performs processing locally in your browser, ensuring your data remains private and secure.