Graphviz DOT Graph Editor

Write graphs in the DOT language and watch them render as you type, with line-numbered syntax errors, four layout engines, an optional exact Graphviz build that runs in your browser, and SVG, PNG and DOT downloads.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Type or open DOT

    Write a graph, open a .dot or .gv file, or pick one of the four samples.

  2. 2
    Fix errors

    Click any line-numbered error to jump to it in the editor.

  3. 3
    Pick a layout

    Choose dot, neato, fdp or circo, and a direction for layered graphs.

  4. 4
    Add snippets

    Insert a node, edge, cluster, same-rank group or default styles with one tap.

  5. 5
    Go exact

    Load Graphviz in WebAssembly for the precise Graphviz layout.

  6. 6
    Export

    Download SVG, PNG or DOT, copy the code, or print the graph with its source.

Informazioni su questo strumento

DOT is the plain-text graph language of Graphviz, used for build pipelines, state machines, dependency trees, network maps and the diagrams many tools generate automatically. This editor has two renderers. The built-in one is written in TypeScript and works offline: its parser reads the full DOT grammar, including strict graphs, directed and undirected graphs, subgraphs and clusters, node, edge and graph default statements, edge chains such as a -> b -> c, edges to whole subgraphs, ports, quoted strings with escapes, HTML labels and all three comment styles. When something is wrong it does not just stop; it reports each error with its line and column, recovers at the next statement and keeps drawing the rest, so one missing bracket does not blank the picture. Click an error to jump to its line. Its layered layout follows the same idea as Graphviz dot: cycles are broken, nodes get ranks by longest path, rank=same groups share a row, long edges are routed through hidden points and rows are reordered to cut crossings. A spring layout stands in for neato and fdp, and a circular one for circo. Common shapes, styles, colours, labels, clusters and rankdir are drawn. For pixel-exact output, press the button to load Graphviz itself compiled to WebAssembly, about 1.2 MB from jsDelivr, pinned to @viz-js/viz version 3.31.0, and the preview switches to the real engine with its own messages.

Choosing a layout engine

Use dot for anything with a direction of flow, such as pipelines, call graphs, org charts and decision trees, and set rankdir=LR when the labels are long and the chain is deep. Use neato for undirected networks where distance should reflect connection, fdp for larger undirected graphs with clusters, and circo for rings, cycles and small state machines. You can force an engine from the menu or let the layout attribute in the file decide. The statistics bar shows node, edge and cluster counts, the number of connected parts, and whether a directed graph contains a cycle, which is useful when the graph is meant to be a dependency tree.

Worked example

Load the build pipeline sample. It is a digraph with rankdir=LR, two clusters named CI and CD, 9 nodes and 9 edges. The statistics show one connected part, no cycle, one start node, checkout, and two end nodes, deploy_prod and rollback. The layered layout places checkout, install, lint and test inside the CI cluster box, then build, deploy_staging, smoke and deploy_prod inside the CD box, with the dashed red fail edge running from smoke to the diamond rollback node. Now load the broken file sample. The parser reports two errors: line 4, column 5, says it expected an attribute name or ] but found --, and that the [ opened on line 3 is still open; line 5, column 8, says it expected a node name but found a semicolon. Nodes a to g are still drawn.

Limits

The built-in renderer does not reproduce Graphviz exactly: edges are smooth curves through layout points rather than true splines, and record shapes, HTML labels and attributes such as splines=ortho are only approximated. Load Graphviz for exact output. The WebAssembly download needs an internet connection the first time.

Esempio svolto

Build pipeline: 9 nodes, 9 edges, 2 clusters, no cycle; broken sample: errors on lines 4 and 5.

In breve

Domande frequenti

Is this the real Graphviz?

There are two renderers. The default one is a separate TypeScript engine written for this page so it works instantly and offline. Press Load exact Graphviz to download the official Graphviz C code compiled to WebAssembly, which gives the same layout as the dot command.

How are syntax errors reported?

Each error shows its line, column and a plain description, such as a missing ] or the wrong edge operator for the graph type. Click one to select that line in the editor. The parser skips the broken statement and keeps reading.

Why does it complain about -- in my digraph?

DOT uses -> for edges in a digraph and -- in an undirected graph. Mixing them is an error in Graphviz as well, so change the operator or change digraph to graph.

How do I put nodes in a box?

Wrap them in a subgraph whose name starts with cluster, for example subgraph cluster_db { label="Database"; users; orders; }. The box gets the label and its own style, color and fillcolor.

Can I export for a website or a document?

Download SVG for sharp scalable output, PNG at double resolution for slides and chat, or the DOT source itself. You can also copy the SVG markup and paste it into an HTML page.

Does my graph leave the browser?

No. Both renderers run in this page. Loading Graphviz only downloads the library from jsDelivr; your DOT text is never sent anywhere, and it is saved in this browser's local storage.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue