JSON Flatten and Unflatten
Flatten nested JSON into single-level dot-notation keys, or rebuild nested objects and arrays from flat keys. Use a custom delimiter if you like.
How to flatten JSON
- Paste your JSON into the box.
- Choose flatten to get dot-notation keys, or unflatten to rebuild the structure.
- Copy the formatted result.
Examples
Nested object and array to flat keys
{ "a": { "b": 1 }, "list": [10, 20] }{ "a.b": 1, "list.0": 10, "list.1": 20 }Frequently asked questions
How are arrays represented when flattening?
Array items use their numeric index as the key segment, so list[0] becomes list.0. Unflattening turns purely numeric segments back into arrays.
Can I change the delimiter?
Yes. The default joiner is a dot, but you can switch to another character such as a slash or an underscore for both flatten and unflatten.
Does flatten then unflatten return the original JSON?
Yes. The two operations are inverses for normal JSON, so a round trip reproduces the same objects, arrays and values.
What happens to empty objects or arrays?
An empty object or array has no leaf values, so it produces no keys when flattened. Add data if you need it represented.
Is my JSON uploaded anywhere?
No. Everything is processed in your browser, so your data stays on your device.
Related tools
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base32 Encode
Base32 encode and decode text online using the standard RFC 4648 alphabet with proper padding. UTF-8 safe, fast and private in your browser.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.