JSON Flattener Online
Flatten nested JSON to dot-notation keys or unflatten back to nested objects.
What Is a JSON Flattener?
A JSON flattener converts a deeply nested JSON object into a flat, single-level object where each key encodes the full path to its value using dot notation — for example, user.address.city. This is useful when working with flat key-value stores, environment variables, CSV exports, or configuration systems that do not support nested structures. The unflatten operation reverses this: it takes a flat object and reconstructs the original nested JSON.
How to Use JSON Flattener
- Select Flatten or Unflatten mode.
- Choose a separator: Dot (.) for standard dot notation, or Bracket ([n]) for array-style indices.
- Paste your JSON into the Input area, or click Load Sample.
- The result appears instantly in the Output area. Click Copy to copy it.
Features
- Flatten mode — convert nested JSON to flat dot-notation keys
- Unflatten mode — reconstruct nested JSON from flat keys
- Two separator styles — dot (.) and bracket ([n]) for array indices
- Array support — handles nested arrays and mixed structures
- Instant preview — output updates as you type
- Privacy-first — all processing is local, no server involved
FAQ
What does JSON flattening do?
JSON flattening converts a nested JSON object into a single-level object where each key represents the full path to the original value using dot notation (e.g. "user.address.city"). This is useful for working with flat key-value stores, CSV exports, or configuration systems.
What is the difference between dot and bracket separators?
Dot separator uses periods to join path segments (e.g. "user.tags.0"). Bracket separator uses array-style notation for numeric indices (e.g. "user.tags[0]"). Both are common conventions depending on the target system.
Can I unflatten a previously flattened JSON?
Yes. Switch to Unflatten mode and paste a flat JSON object with dot-notation keys. The tool will reconstruct the original nested structure.
Is my data sent to a server?
No. All processing happens entirely in your browser. No data is sent to any server.