Flatten a nested object
Input
{"user":{"id":7,"profile":{"email":"a@example.com"}}} Output
{
"user.id": 7,
"user.profile.email": "a@example.com"
} Useful when nested values need to be reviewed as simple path-value pairs.
Developer Tools
Review practical JSON Flatten examples so you can understand expected input, output, and common patterns faster.
Use this JSON Flatten tool to convert nested JSON into a flat object where each key represents a full path. It is useful for exports, analytics prep, debugging nested payloads, quick mapping work, documentation, and turning complex objects into a simpler shape for inspection or transformation. Arrays are represented with indexed paths so you can still see where values came from.
Example pages are especially useful for developer tools because they show what good input looks like, what kind of output to expect, and how the tool behaves in common scenarios.
Input
{"user":{"id":7,"profile":{"email":"a@example.com"}}} Output
{
"user.id": 7,
"user.profile.email": "a@example.com"
} Useful when nested values need to be reviewed as simple path-value pairs.
Input
{"orders":[{"id":101},{"id":102}]} Output
{
"orders[0].id": 101,
"orders[1].id": 102
} Useful when array content must stay traceable after flattening.
Fix: Validate or format the payload before flattening it.
Fix: Flattening converts nested structure into path-based keys, so use JSON Formatter if you want the original shape.
Fix: This tool uses indexed paths like items[0].name so each nested value remains traceable.
Fix: This page only flattens JSON. Reverse expansion would be a separate tool.
Fix: Use the flattened result for analysis or mapping, not where the original schema must stay nested.
After reviewing these examples, run the live tool with your own input. If your task involves a follow-up step, the related page can help you move to the next tool in the workflow.
Open the main JSON Flatten page and test your own real input.