JSON Flatten / Unflatten
Local ProcessingFlatten nested JSON into dot paths or rebuild nesting from dot paths.
How It Works & Processing Standards
Flatten nested JSON into dot paths or rebuild nesting from dot paths.
Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.
Current Limits
- Desktop max file size: 50MB
- Mobile max file size: 20MB
Choose flatten or unflatten under "Task". Useful for moving data into tables or CSV, or matching one-level key formats such as i18n files and environment variables. The separator is configurable.
What You Can Do
- Flatten
- Spreads nested objects into dotted path keys.
- Unflatten
- Rebuilds nested objects from dotted keys.
How to Use JSON Flatten / Unflatten
- 1Choose a taskFlatten or unflatten.
- 2Enter JSON and separatorPaste JSON and set the separator (default .).
- 3CopyCopy the result.
Examples
Flatten
Input: {"user":{"name":"민수","address":{"city":"서울"}}}
Result: {
"user.name": "민수",
"user.address.city": "서울"
}
Unflatten
Input: {"a.b":1,"a.c":2}
Result: {
"a": {
"b": 1,
"c": 2
}
}
Common Use Cases
- Before spreading nested JSON into CSV columns
- Restructuring keys in i18n translation files
Frequently Asked Questions (FAQ)
What if keys contain dots?
Dots are read as path separators when unflattening. Use another separator such as / if keys contain dots.
