Flatten JSON Online.
Flatten nested JSON into path-based keys with dot, bracket, slash, or underscore delimiters. Handle array indexes, sort keys, minify output, and unflatten JSON back to nested objects on the same page.
No signup · No uploads · Flatten and unflatten
Flattened JSON output
// Flattened JSON appears here. Flatten JSON online - free and private
A flatten JSON tool converts nested JSON into a flat object where each key represents the full path to a value. That makes deeply nested data easier to export, compare, search, store in a table, or map into systems that expect one level of keys. Everything runs client-side, so your JSON is never uploaded.
How to flatten JSON in three steps
- Paste nested JSON into the input, or load the sample.
- Choose delimiter and array options - dot, bracket, slash, underscore, and indexed arrays.
- Flatten and export - copy or download the flat JSON object.
Delimiter choices for flat JSON keys
Different tools expect different path styles. Choose dot notation
(user.name), bracket notation (user[name]),
slash paths (user/name), or underscore keys
(user_name). This makes the JSON flattener
useful for APIs, spreadsheets, databases, logs, and config files.
Array indexes and unflatten mode
Enable array indexing to create keys like users.0.email.
Disable it when you want arrays to stay as JSON values. Need to reverse
the process? Switch to Unflatten JSON mode to rebuild
nested objects and arrays from flat keys, with auto-detection for common
delimiters.
Why use this JSON flatten tool?
It is private, fast, and gives you the choices many simple flatteners hide. After flattening, you can compare structures with JSON Diff, convert flat records with JSON to CSV, or inspect output with JSON Viewer. Learn more in our guide on how to flatten JSON.
FAQ
Flatten JSON, answered.
How do I flatten JSON online? +
Paste nested JSON into the JSON Flatten tool and press Flatten JSON. The tool converts nested objects into a flat JSON object where each key contains the full path, such as user.address.city.
Which flatten JSON delimiters are supported? +
You can choose dot notation, bracket notation, slash paths, or underscore keys. Examples include user.name, user[name], user/name, and user_name. This helps match the format expected by your API, database, spreadsheet, or config tool.
Can it flatten JSON arrays with indexes? +
Yes. With Index arrays enabled, arrays become keys such as roles.0 or users.1.email. Turn it off to keep arrays as JSON values instead of expanding every item into indexed paths.
Can I unflatten JSON on the same page? +
Yes. Switch to Unflatten JSON mode to rebuild nested objects and arrays from flat keys. You can choose a delimiter or use auto-detect for dot, bracket, slash, and underscore paths.
Does JSON flattening change values? +
No. Primitive values such as strings, numbers, booleans, and null stay as real JSON values. Objects and arrays are only changed into path-based keys when you choose to flatten them.
Is my JSON uploaded when flattening? +
No. Flatten JSON and unflatten JSON both run entirely in your browser. Your data is never uploaded, stored, logged, or seen by any server.