DataToolMage

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

  1. Paste nested JSON.
  2. Copy the flat object.
  3. 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

Flatten JSON — Dotted Keys, Browser Local