Graphviz diagram renderer

Draw a diagram from Graphviz DOT source as SVG or PNG: flowcharts, trees, networks and dependency graphs. Runs the Graphviz layout program on your DOT source and returns the drawing as a file. The source is checked first, and the program runs with file loading switched off.

Input

The graph in the DOT language.
Layout style: dot for layered flowcharts and trees, neato and fdp for networks, circo for circles, twopi for rings around a centre.
svg stays sharp at any size; png is a fixed-size picture.
Resolution of a PNG, in dots per inch. Ignored for SVG.

Result

Choose a file and press Run.

Files you upload and the results are stored for one hour, then deleted. Anyone who has the link can open them, so don't upload anything private.

Use it from code or an agent

curl -s https://setget.net/v1/tools/graphviz \
  -H 'Content-Type: application/json' \
  -d '{"input":{"source":"digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label=\"fix\"]; }"},"wait":30}'
import json, urllib.request

body = {'input': {'source': 'digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label="fix"]; }'}, 'wait': 30}
request = urllib.request.Request("https://setget.net/v1/tools/graphviz", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/graphviz", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"source":"digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label=\"fix\"]; }"},"wait":30}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "graphviz",
  "input": {
    "source": "digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label=\"fix\"]; }"
  },
  "wait": 30
}
{
  "input": {
    "source": "digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label=\"fix\"]; }"
  },
  "wait": 30
}

This is a file tool, so a call takes three steps: upload the file to get a reference, run the tool with that reference, then read the result and download its files. Uploads and results are public by link and expire after one hour.

Endpoint: POST /v1/tools/graphviz. Over MCP: run_tool with slug: "graphviz". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
source string yes The graph in the DOT language.
engine string no Layout style: dot for layered flowcharts and trees, neato and fdp for networks, circo for circles, twopi for rings around a centre. One of: dot, neato, fdp, circo, twopi. Default: "dot".
format string no svg stays sharp at any size; png is a fixed-size picture. One of: svg, png. Default: "svg".
dpi integer no Resolution of a PNG, in dots per inch. Ignored for SVG. Default: 96. From 48 to 300.

Examples

A small flowchart as SVG

Input
{
  "source": "digraph { rankdir=LR; Plan -> Build -> Test -> Ship; Test -> Build [label=\"fix\"]; }"
}
Result

Press the example button above to make it.

A circular layout as PNG

Input
{
  "source": "graph { a -- b -- c -- d -- a; a -- c; node [shape=circle]; }",
  "engine": "circo",
  "format": "png",
  "dpi": 120
}
Result

Press the example button above to make it.

Questions

Can my graph use pictures, custom shapes or font files?
No. Only what is written in the source is drawn. The "image", "shapefile", "imagepath" and "fontpath" settings and IMG elements in labels are refused, because they read files from the machine that draws the graph.
What happens to links in my graph?
URL and href settings are removed from SVG results, so the drawing never points anywhere. The result says how many were removed.
What are the limits?
50,000 characters of source, about 1,000 nodes and 3,000 edges, and 20 seconds to work out the layout. Large networks lay out fastest with the dot engine.
How do I get a JPG or WebP?
Render to PNG here, then pass the result to image-convert.