Back to AI Tools

Diagram Generator

Create beautiful flowcharts, network diagrams, and graphs using Graphviz DOT language with live preview and easy download

DOT Code
Selected: none Drag shapes into canvas, click nodes to select.
Elements
Arrows
Upper/Lower center textbox: write relationship name Left/Right textbox: cardinality, e.g. 1..*
Tip: select two nodes to connect or label.
Preview

Your diagram will appear here

Click Generate to render your diagram

Quick Examples
Tool Documentation

Class / Object Diagram Skeleton

digraph G { rankdir=TB; node [shape=record, style="rounded,filled", fillcolor="#e0f2fe"]; User [label="{User|+id:int\l+name:string\l|+login()\l}"]; Session [label="{Session|+token:string\l}"]; User -> Session [label="1..*", arrowhead=vee]; }

Object, Component, Deployment, Use Case

Use Case: shape=ellipse Object: shape=record with instance labels (user1:User) Component: shape=component Deployment: nodes as box + stereotypes in labels (<<node>>)

Actor Style 1: Emoji Actor (Simple)

Customer [shape=box, style="rounded,filled", fillcolor="#dcfce7", label="👤 Customer"]; Customer -> Login;

Actor Style 2: HTML-like Table Stickman

Actor [shape=none, margin=0, label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="6" BGCOLOR="#fff7ed"> <TR><TD><B>Actor</B></TD></TR> <TR><TD> o <BR/> /|\ <BR/> / \</TD></TR> </TABLE> >];

Actor Style 3: Icon Font-like Label

Admin [shape=box, label="<<actor>>\\nAdmin", style="dashed,rounded"]; Guest [shape=box, label="<<actor>>\\nGuest"];

Color System

node [style="rounded,filled", color="#1d4ed8", fillcolor="#dbeafe", fontcolor="#0f172a"]; edge [color="#334155", penwidth=1.2, fontcolor="#334155"]; graph [bgcolor="white"];

Typography & Text Styling

graph [fontname="Arial", fontsize=12]; node [fontname="Arial", fontsize=11, margin="0.1,0.05"]; edge [fontname="Arial", fontsize=10, style=dashed];

UML Relation Mapping

Inheritance: Child -> Parent [arrowhead=empty] Composition: Whole -> Part [arrowhead=diamond] Aggregation: Whole -> Part [arrowhead=odiamond] Dependency: A -> B [style=dashed, arrowhead=vee] Association: A -> B [arrowhead=vee]

Default Standard

This generator defaults to UML-ready style and notation. Switch standard tabs when you want flowcharts, network, architecture, or ERD conventions.

Basic Structure

digraph G { A -> B; } // Directed graph (arrows) graph G { A -- B; } // Undirected graph (lines)

Nodes & Shapes

NodeName [label="Text"]; // Node with label [shape=box] // box, circle, diamond, ellipse [style=filled, fillcolor=lightblue] // Filled color

Connections

A -> B; // Directed edge (arrow) A -- B; // Undirected edge (line) A -> B [label="text"]; // Edge with label [style=dashed] // dashed, dotted, bold

UML Relationships

Child -> Parent [arrowhead=empty]; // Inheritance / Extends A -> B [arrowhead=diamond]; // Composition A -> B [arrowhead=odiamond]; // Aggregation A -> B [style=dashed]; // Dependency / Include A -> B; // Association

Class Diagram

node [shape=record]; // Use record shape Class [label="{Name|fields|methods}"]; // 3 sections + field\l // + public, - private, # protected

Use Case Diagram

Actor [shape=box, label="👤 User"]; // Actor (person) UseCase [shape=oval]; // Use case (oval) subgraph cluster_system { } // System boundary Actor -> UseCase; // Association [style=dashed, label="<>"] // Include/Extend

Sequence Diagram

Object [label=":ClassName"]; // Participant object A -> B [label="1: message()"]; // Synchronous call [style=dashed]; // Return message (dashed) rankdir=TB; splines=ortho; // Top-to-bottom flow

Direction & Layout

rankdir=LR; // Left to Right rankdir=TB; // Top to Bottom rankdir=RL; // Right to Left rankdir=BT; // Bottom to Top

Colors

color=blue, fillcolor=lightblue // Named colors "#FF5733" // Hex colors "rgb(255,87,51)" // RGB colors

Grouping

subgraph cluster_0 { A; B; } // Group nodes in box node [style=filled]; // Default node style edge [color=gray]; // Default edge style

Popular Tags

Diagram Generator UML Diagram Flowchart Sequence Diagram Class Diagram Graphviz DOT Language PlantUML Alternative Free Tool Visual Design Code to Diagram