JSON Flattener & Unflattener
Dot NotationFlatten deep nested JSON objects into flat dot-notation keys or unflatten flat keys back to nested JSON trees.
JSON Flattener & Unflattener Online - Dot Notation Converter
Quickly flatten deeply nested JSON structures into clean, single-level key-value pairs using dot notation, underscore, slash, or bracket syntax. Or reverse the process to unflatten flat keys back into full nested JSON trees.
Essential for exporting JSON data into flat spreadsheets, CSVs, relational databases, Elasticsearch, Kibana, and BigQuery tables. Operates 100% in your browser for absolute data confidentiality.
Why Use PlayWithJSON?
- Bidirectional: Flatten nested JSON or Unflatten dot notation back to objects
- Custom delimiters: Dot (.), Underscore (_), Slash (/), and Bracket ([key])
- Array handling: Flatten array elements or keep arrays intact as values
- Automatic array reconstruction from numeric path keys (e.g., items.0, items.1)
- 100% client-side execution keeping confidential data secure
Key Features of JSON Flattener & Unflattener
Bidirectional Flatten & Unflatten
Switch between Flatten (deep to single-level) and Unflatten (flat keys to nested tree) with one click.
Multiple Delimiter Styles
Choose standard dot notation (user.name), underscore (user_name), slash (user/name), or bracket (user[name]).
Smart Array Reconstruction
Unflattening accurately converts numbered index keys (e.g. items.0, items.1) back into real JSON arrays.
Depth Control
Optionally preserve arrays or limit flattening depth to keep certain sub-trees together.
JSON5 Support
Handles trailing commas, comments, and unquoted keys in input data seamlessly.
Instant Copy & Download
Copy the transformed JSON immediately or download it as a ready-to-use .json file.
How to Flatten or Unflatten JSON Online
Paste JSON Data
Paste nested JSON or flat dot-notation keys into the input editor.
Choose Mode
Select "Flatten" to flatten nested structures or "Unflatten" to restore nested trees.
Customize Delimiter
Pick Dot, Underscore, Slash, or Bracket syntax according to your target tool.
Copy or Download
Copy the output or download it as flattened_data.json.
JSON Flattening Example
Data Structure Support
Supported Capabilities
Frequently Asked Questions about JSON Flattener
More JSON Developer Tools
JSON Formatter
Format, validate and inspect JSON data
JSON5 Formatter
Format and validate JSON5 with comments
JSON ↔ JSON5
Convert between JSON and modern JSON5
JSON to TypeScript
Generate TypeScript interfaces from JSON
JSON to Zod
Generate Zod schemas from JSON
Text to JSON
Convert text and schemas into structured JSON
JSON Sorter Online
Sort JSON keys alphabetically and order arrays
JWT Decoder Online
Decode JWT header, payload and expiration
JSON Stringify Online
Escape quotes and stringify or unescape JSON
Mock JSON Generator
Generate realistic mock data for APIs and testing
JSON to CSV
Export structured JSON arrays into CSV spreadsheets
JSONPath Tester
Query and filter JSON data with path expressions
JSON Schema Generator
Generate JSON Schema from sample JSON
JSON Diff & Compare
Compare two JSON objects and find differences
JSON ↔ YAML
Convert JSON/JSON5 to YAML and back with comments
JSON ↔ XML
Convert JSON to XML and XML to JSON with attributes
YAML to CSV
Convert YAML lists and objects into spreadsheets
CSV to JSON / JSON5
Convert CSV/TSV to JSON or JSON5 with type parsing
JSON to BigQuery
Generate BigQuery Schema JSON and CREATE TABLE DDL
JSON to GraphQL
Generate GraphQL SDL types, queries, and inputs
JSON to MySQL
Generate MySQL CREATE TABLE DDL and INSERT queries
JSON to PostgreSQL
Generate PostgreSQL CREATE TABLE DDL, JSONB and INSERTs
JSON Flattener
Flatten nested JSON to dot notation or unflatten back
JSON Tree Visualizer
Interactive SVG mindmap graph and collapsible node tree
JSON Minifier Online
Compact and compress JSON by stripping whitespace
JSON Token Counter
Calculate LLM tokens (GPT-4o, Claude) and API costs
Broken JSON Repair
Automatically heal broken and truncated AI/LLM JSON