Reshape
Flatten JSON
Collapse nested objects and arrays into a single object of dotted paths. Arrays use [index]. Colliding key characters are refused.
Input is processed in your browser. DataToolMage does not upload it, store it, or send it to analytics.
Paste structured data. Work stays in this browser.
How it works
A depth-limited walk writes primitives onto dotted paths. Empty objects and arrays keep a path so structure is not dropped.
Input and output
Input is JSON. Output is a single JSON object of paths.
Common uses
Nesting
{"user":{"id":1}} becomes {"user.id":1}.
Array
{"items":[{"sku":"A"}]} becomes {"items[0].sku":"A"}.
How to use this tool
- Paste nested JSON.
- Copy the flat object.
- Use JSON to CSV if you need a table next.
Limitations
- This is not JSONPath extraction.
- Unflatten is not launched yet.
- Path count and nesting are capped.
Questions
- How are arrays encoded?
- items[0].name means the name of the first array element. This is not JSONPath.
- What if a key already contains a dot?
- The tool refuses the document instead of creating an ambiguous path. Rename the key first.
Related tools
JSON to CSV
Paste objects and get a table. Column order follows first-seen keys. Nested values are serialized as JSON text, not silently dropped.
CSV to JSON
Paste a delimited table and get an array of objects. Delimiters can be detected. Type inference is optional and conservative.
YAML to JSON
Paste YAML maps and sequences and get JSON. Only JSON-compatible types are accepted so implicit YAML 1.1 typing cannot rewrite values.