Skip to Content
ToDiagram

JSON

Open API responses, configuration files and any other JSON as a diagram.

Paste JSON or open a .json file and ToDiagram draws its structure: every object and array becomes a node, and every field becomes a row.

Example

{
  "user": {
    "id": 4812,
    "name": "Dana Whitfield",
    "plan": "pro"
  },
  "orders": [
    {
      "id": "A-1042",
      "total": 138.5,
      "paid": true
    },
    {
      "id": "A-1057",
      "total": 24.0,
      "paid": false
    }
  ]
}
The JSON above as a diagram: a root node linked to a user node and two order nodes
The same JSON as a diagram.

Open a JSON example in the editor

How JSON is drawn

  • An object is a node. Its fields with plain values are rows in that node.
  • A field that holds an object or an array shows a count, such as {3 keys} or [2 items], and links to a node of its own. Click the button on the row to fold or unfold it.
  • Items of an array are named by their position, such as orders[0].
  • Values are colored by type: text, numbers, true, false and null. A value that is a color, such as #FF0000, shows a swatch.

Good to know

  • Comments are allowed, both // and /* */.
  • A syntax error stops the diagram from updating. The status mark under the text editor turns red, and hovering it shows the error.
  • Text that holds one JSON object or array per line opens as JSON Lines, even from a .json file.

On this page