Ready to flatten
Paste your JSON and click Flatten// flatten nested json into dot-notation paths instantly
Flatten deeply nested JSON into dot-notation key paths instantly. Inspect, debug, and export flat key-value pairs from complex JSON structures.
Ready to flatten
Paste your JSON and click FlattenEnter any deeply nested JSON object or array in the input panel.
Choose your delimiter (default: dot) and whether to keep arrays as values.
Click Flatten, then copy individual values or export all as CSV or JSON.
JSON Flattener converts nested JSON objects into a single-level map where each key is the full dot-notation path to a leaf value. Nested objects become a.b.c paths and array items use bracket notation like items[0].name.
JSON flattening is the process of converting a multi-level nested JSON object into a single flat object where each key represents the full path to a leaf value using dot notation (e.g., user.address.city).
Array elements are represented with bracket notation, for example tags[0], tags[1]. If "Keep arrays as values" is checked, arrays are preserved as-is without expanding their elements.
Yes! The default delimiter is a dot (.) but you can change it to any character such as /, _, or __ to match your preferred path format.
No. All flattening is done entirely in your browser using JavaScript. Your JSON data never leaves your machine and is never stored anywhere.
You can export the flattened result as a CSV file (key, type, value columns) or as a flat JSON object. You can also copy the entire output to clipboard with one click.
The tool is browser-based and works entirely in memory. In practice it handles JSON up to several megabytes comfortably, though very large files (50MB+) may be slow depending on your device.
A JSON Flattener is a developer utility that transforms deeply nested JSON structures into a single flat layer, where every leaf value is accessible via a dot-notation key path. Instead of navigating multiple levels of braces and brackets, you get a clean list of paths like user.profile.address.city or orders[0].items[2].sku.
This makes it dramatically easier to inspect complex API responses, compare configurations, map data to flat relational formats, or build a spreadsheet from JSON exported by a third-party service.
💡 Looking for premium JavaScript plugins and scripts? MonsterONE offers unlimited downloads of templates, UI kits, and assets — worth checking out.
The process is conceptually simple: the flattener recursively walks every node in the JSON tree. When it encounters a nested object, it extends the current key path with a dot separator. When it encounters an array, it appends bracket notation for each index. When it reaches a primitive value (string, number, boolean, or null), it records the full path and value as a flat key-value pair.
For example, this input:
{
"user": {
"name": "Alice",
"roles": ["admin", "editor"]
}
}
Produces these flat paths:
user.name → "Alice"
user.roles[0] → "admin"
user.roles[1] → "editor"
Flattening is especially useful in several scenarios. First, when mapping API responses to databases — relational databases expect flat rows with named columns, so flattening JSON from a REST API gives you a direct mapping to column names. Second, when debugging nested configurations — seeing all values in a single scrollable list makes it much faster to spot unexpected values or missing keys. Third, when creating spreadsheets from JSON — tools like Excel and Google Sheets expect rows and columns, not nested objects. Exporting flattened JSON as CSV gives you a spreadsheet-ready format instantly.
Two conventions are common for representing JSON paths. Dot notation (a.b.c) is used for object properties and is the most readable format, widely understood by developers. Bracket notation (a[0].b) is used for array indices and mirrors how JavaScript itself accesses array elements. Our flattener combines both: dots for object keys, brackets for array indices, giving you paths that are both human-readable and directly usable in code.
While dots are the default and most common separator, some use cases benefit from alternative delimiters. For example, if your JSON keys themselves contain dots (common in configuration files), you might prefer a double underscore (__) or a forward slash (/) to avoid ambiguity. Our tool lets you specify any custom delimiter before flattening, so the output paths match whatever convention your downstream system expects.
Once flattened, the tool offers three ways to use the output. Copy All copies every key-value pair to your clipboard in a readable format. Export JSON downloads a flat .json file — a single object with all paths as string keys. Export CSV downloads a spreadsheet-compatible file with three columns: key path, value type, and value. The CSV export is particularly useful for documentation, auditing, or importing into a database schema tool.
Each leaf value in the flattened output is annotated with its JSON type: string, number, boolean, or null. This is helpful when reviewing API responses because you can quickly confirm that numeric IDs are actually numbers rather than strings, or that optional fields are null rather than absent entirely.
For large JSON payloads that flatten into hundreds or thousands of paths, the built-in search filter lets you narrow results instantly. Type any substring to show only matching key paths — useful when you know what you're looking for (e.g., all paths containing address or id) without scrolling through an enormous list.
This tool processes all data entirely in your browser. No JSON is ever transmitted to a server, stored in a database, or logged. You can safely paste sensitive configuration files, private API responses, or internal data structures without any privacy concerns. Everything happens locally in memory and is discarded the moment you close the tab.