A free browser-based tool that instantly flattens deeply nested JSON into dot-notation key-value pairs and unflattens them back — with custom delimiter support and one-click copy.

JSON Flattener is a free, browser-based tool that converts deeply nested JSON objects into flat dot-notation key-value pairs — and back again. Paste your JSON, choose flatten or unflatten, pick a delimiter, and copy the output. No login, no API calls, no data leaves your browser.
Nested JSON is excellent for representing hierarchical data. It is terrible when you need to:
In all of these cases, the structure that makes nested JSON readable becomes the structure that makes it unusable. You need the data flat. And flattening it by hand — especially across five or six levels of nesting — is error-prone and slow.
The reverse problem also occurs. A flat configuration file with keys like database.host, database.port, and database.name needs to be reconstructed into a proper nested object before being passed to an SDK or framework. Writing that transformation by hand is tedious boilerplate.
Paste any nested JSON object into the left panel. The tool recursively walks every key and constructs a flat representation where the full path to each value becomes the key.
{
"user": {
"name": "Alice",
"address": {
"city": "London",
"zip": "EC1A 1BB"
},
"tags": ["admin", "developer"]
}
}Becomes:
{
"user.name": "Alice",
"user.address.city": "London",
"user.address.zip": "EC1A 1BB",
"user.tags[0]": "admin",
"user.tags[1]": "developer"
}Arrays are handled with bracket-index notation ([0], [1]) to keep array indices unambiguous and fully reconstructable.
Switch to Unflatten and paste a flat dot-notation object. The tool splits each key on the delimiter and reconstructs the nested structure.
{
"config.db.host": "localhost",
"config.db.port": 5432,
"config.cache.ttl": 3600
}Becomes:
{
"config": {
"db": {
"host": "localhost",
"port": 5432
},
"cache": {
"ttl": 3600
}
}
}The default delimiter is a dot (.), but you can switch to:
user_address_city) — common in environment variable naming conventionsuser/address/city) — used in some config and path-based systemsuser->address->city) — useful when keys themselves contain dotsBelow the output panel, the tool shows the number of keys in the result and the output byte size — useful for quickly checking that all expected keys are present.
The flattener is a recursive function that walks any JSON value:
[0], [1], ...)The unflattener splits each flat key on the delimiter and builds up the nested object level by level.
Stateless processing — each keystroke re-derives the output from the current input. No intermediate state. The transformation is pure and deterministic.
Error isolation — invalid JSON is caught at the parse step and shown as an inline error below the input panel. The output panel stays clean rather than showing a partial or garbled result.
Delimiter-agnostic round-trip — the same delimiter used to flatten is used to unflatten. The tool makes the currently-selected delimiter visually prominent so there's no ambiguity when round-tripping.
Many applications load configuration from flat environment variables and map them into nested config objects. A DATABASE__HOST or database.host convention is common. JSON Flattener lets you paste a nested config object and immediately see the flat key names you need to define in .env.
MongoDB uses dot-notation for querying nested fields: db.users.find({"address.city": "London"}). JSON Flattener converts a sample document into flat dot-notation, giving you the exact query paths you need without manually tracing the nested structure.
HTML form inputs often use dot-notation field names (user.name, user.address.city) to represent nested data. JSON Flattener lets you unflatten these into a proper nested object for API submission.
When a config file parsed from TOML, YAML, or INI ends up as a flat key-value store, comparing it to an expected nested structure requires seeing both formats. Flatten the expected structure and compare key-by-key.
Large API responses with deep nesting are hard to scan. Flatten the response to see all leaf-level values in a flat list — useful for quickly finding a specific value buried inside a complex nested object.
When moving data between systems with different schema conventions, flattening a nested document before writing it to a flat table — or unflattening flat rows before inserting them into a document store — is a common transformation step.
vs. Writing it yourself — implementing a correct recursive flattener that handles arrays, empty objects, null values, and custom delimiters takes 30–60 minutes. The tool is already built and in your browser.
vs. lodash _.flattenDepth — lodash flattens arrays, not objects. JSON object flattening to dot-notation is a different operation with different semantics.
vs. flat npm package — the npm package is correct and widely used. JSON Flattener gives you the same result through a browser UI, with no Node.js environment required, for the cases where you have a JSON blob and need the answer now.
The client needed a robust developer tools solution that could scale with their growing user base while maintaining a seamless user experience across all devices.
We built a modern application using JSON and Developer Tools, focusing on performance, accessibility, and a delightful user experience.
Category
Developer Tools
Technologies
Date
June 2026
More work in Developer Tools