Home › Developer Tools › Graphviz Online Viewer

Graphviz Online Viewer

Edit Graphviz DOT code on the left and watch the graph render on the right as you type. Switch between the dot, neato, fdp, sfdp, circo, twopi, osage and patchwork layout engines, then download the graph as SVG or PNG or copy a shareable link.

Last updated:

Ln 1
PreviewLoading Graphviz…
Loading Graphviz…
Advertisement
Advertisement

How to use the Graphviz Online Viewer

  1. Write or paste DOT code in the editor, or start from one of the examples above it.
  2. Watch the preview update as you type. Syntax errors are listed under the editor with the line number highlighted.
  3. Choose a layout engine: dot for hierarchies and flowcharts, neato or fdp for networks, circo for rings, twopi for radial trees.
  4. Zoom and pan with the + / − buttons, Ctrl + scroll wheel, or by dragging the preview.
  5. Download the graph as SVG for documents and the web or PNG for slides, or copy a link to share it.

DOT language quick reference

You wantDOT code
Directed graph with arrowsdigraph G { a -> b -> c; }
Undirected graphgraph G { a -- b; b -- c; }
One node to severala -> {b c d};
Node label and shapedb [label="Database", shape=cylinder];
Defaults for all nodes / edgesnode [shape=box, fontname="Helvetica"]; edge [color=gray];
Filled, rounded boxesnode [shape=box, style="rounded,filled", fillcolor="#eef5f0"];
Edge label, dashed edgea -> b [label="retry", style=dashed];
Left-to-right layoutrankdir=LR;
Keep nodes on the same level{ rank=same; b; c; }
Box around a groupsubgraph cluster_x { label="Group"; a; b; }
Multi-line labela [label="line one\nline two"];
Table-like nodeuser [shape=record, label="{User|id|email}"];

Layout engines compared

EngineLayoutBest for
dotLayered (hierarchical), edges flow in one directionFlowcharts, dependency graphs, state machines, org charts
neatoSpring model (stress majorization)Small and medium undirected networks
fdpForce-directed, supports clustersUndirected graphs with groups
sfdpMultiscale force-directedLarge graphs with thousands of nodes
circoCircularRings, cyclic structures, network topologies
twopiRadial, root in the centreTrees and hub-and-spoke graphs
osagePacks clusters into an arrayGrouped items, module overviews
patchworkSquarified treemapHierarchical sizes (set area on nodes)

Tips

  • Quote IDs with spaces or symbols: "API gateway" -> "user-db". Plain IDs may only contain letters, digits and underscores, or be a number.
  • Common errors: a missing semicolon is fine in DOT, but a missing closing brace, an unquoted ID with a hyphen, or -> inside an undirected graph are syntax errors.
  • Colors can be names (tomato, lightblue), hex ("#2f6b4f") or HSV triples ("0.6 0.4 0.9").
  • Prefer Markdown-style diagram syntax? Try the Mermaid Diagram Editor, which GitHub renders inside README files.

Frequently asked questions

What is the DOT language?

DOT is the plain-text graph description language of Graphviz. You declare a graph or digraph, list nodes with optional attributes such as shape and color, and connect them with -- (undirected) or -> (directed) edges. Graphviz then calculates the layout automatically.

Which layout engine should I use?

dot draws hierarchical, layered graphs and is best for flowcharts, call graphs and dependency trees. neato and fdp use spring models for undirected networks; sfdp is the scalable version for thousands of nodes. circo arranges nodes in circles, twopi draws radial layouts around a root, osage packs clusters and patchwork draws treemaps.

Is this the real Graphviz?

Yes. The tool runs viz.js, a WebAssembly build of the official Graphviz C code, so layouts and SVG output match the dot command line. If that library cannot be downloaded, a simplified built-in preview is shown and clearly labelled.

How do I change the direction of a graph?

Add rankdir=LR; inside the graph for left-to-right layout. Other values are TB (top to bottom, the default), BT and RL. rankdir is used by the dot engine.

How do I group nodes in a box?

Put them in a subgraph whose name starts with cluster, for example subgraph cluster_backend { label="Backend"; api; db; }. The dot, fdp and osage engines draw a rectangle around each cluster.

Can I export a high-resolution image?

Yes. SVG is a vector format that stays sharp at any size and can be edited in Inkscape or Illustrator. For PNG, pick a scale from 1× to 4×; 2× is a good choice for slides and documents.

Is my graph uploaded?

No. The DOT code is rendered in your browser and saved only in your browser's local storage. A shared link contains the code itself in the part of the URL after #, which browsers do not send to the server.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.Flowchart MakerDrag-and-drop flowcharts with standard shapes, connectors and snap grid; PNG/SVG/JSON.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Query CSV with SQLRun SQL on CSV, Excel, JSON and Parquet files in your browser with DuckDB. Join and export.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.Regex TesterTest and debug regular expressions live.File Info ViewerCheck file size, type, date and MD5/SHA hashes.SQLite ViewerOpen .db and .sqlite files in your browser, browse tables and run SQL queries.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Country Codes ListSearch ISO 3166 alpha-2, alpha-3 and numeric country codes with calling codes and TLDs.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Code EditorVS Code-style editor in your browser: tabs, 50+ languages, find/replace, autosave.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.ASCII Diagram EditorDraw boxes, arrows and text on a character grid and copy plain-text diagrams for code and READMEs.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.Glob Pattern TesterTest glob patterns like **/*.js, {a,b} and !exclusions against a list of file paths.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.
See all 53 Code Playgrounds & Testers →