How This JSON Flatten Tool Works
Paste nested JSON and this json flatten tool free of signup produces flat dot-notation keys instantly, a genuine json to dot notation converter and json dot notation converter for the reverse direction, unflatten json object output back to its original nested shape. It's useful for logging systems, form field naming, or any flat key-value storage system that can't represent nested structure directly, flatten json online with realtime updates as you type.
Separators and Array Notation
Choose the key separator that fits your target system, a dot for the conventional "user.address.city" style, an underscore for "user_address_city", or a slash for "user/address/city". For flatten json array output specifically, pick between two array representations, dot notation writes an array index the same way as a nested key, "items.0", "items.1", bracket notation writes it as "items[0]", "items[1]", matching the syntax many templating and config languages use for array access.
Unflattening Back to Nested Structure
The json unflatten direction rebuilds nested objects and arrays from flat keys, walking each key's path segments and creating an object or array at each level depending on whether the next segment looks like a property name or a numeric array index. It correctly restores arrays represented in either dot notation or bracket notation, "items.0" and "items[0]" both unflatten back to a real items array rather than staying as literal flat keys.
Common Uses and Limitations
Turning a nested json to flat object is useful for CSV export (a flat key-value shape maps naturally to spreadsheet columns), environment variable naming, or feeding a nested config into a system that only understands flat keys, like some search indexes and logging platforms. One honest limitation: a property name that happens to contain your chosen separator character, or bracket-like text of its own, can't round-trip perfectly, since the flat key format uses that same character as a structural delimiter, and there's no way to tell the two apart after flattening.