Skip to content

Draw.io Cheat Sheet

Overview

Draw.io (now branded as diagrams.net) is a free, open-source diagramming tool that runs in the browser or as a desktop application. It supports creating flowcharts, network diagrams, UML diagrams, org charts, mind maps, floor plans, and virtually any kind of visual diagram. Diagrams are saved as editable XML files that can be stored locally or in cloud services.

Draw.io integrates with Google Drive, OneDrive, Dropbox, GitHub, GitLab, Confluence, and Jira. The desktop version works offline on Windows, macOS, and Linux. The tool provides hundreds of shape libraries, custom styling, layers, and export to PNG, SVG, PDF, and other formats.

Installation

# macOS via Homebrew
brew install --cask drawio

# Linux via Snap
sudo snap install drawio

# Linux via Flatpak
flatpak install flathub com.jgraph.drawio.desktop

# Linux via deb package
wget https://github.com/jgraph/drawio-desktop/releases/latest/download/drawio-amd64.deb
sudo dpkg -i drawio-amd64.deb

# Windows via Chocolatey
choco install drawio

# Windows via winget
winget install JGraph.Draw

Web Version

Access at https://app.diagrams.net with no installation required.

Keyboard Shortcuts

ShortcutAction
Ctrl+SSave diagram
Ctrl+ZUndo
Ctrl+Shift+ZRedo
Ctrl+ASelect all
Ctrl+DDuplicate selected
Ctrl+GGroup selected shapes
Ctrl+Shift+UUngroup
Ctrl+Shift+FToggle format panel
Ctrl+Shift+XInsert/Edit XML
Ctrl+FFind/Replace
Ctrl+EExport as image
DeleteDelete selected
F2Edit selected cell label
Ctrl+KInsert link
Ctrl++ / Ctrl+-Zoom in / out
Ctrl+Shift+HFit page

Shape Libraries

LibraryContents
GeneralBasic shapes, arrows, callouts
UMLClass, sequence, activity shapes
NetworkRouters, switches, servers, cloud
AWSAmazon Web Services architecture icons
AzureMicrosoft Azure service icons
GCPGoogle Cloud Platform icons
KubernetesK8s pods, services, deployments
FlowchartStandard flowchart symbols
MockupsWireframe and UI mockup elements
Floor PlansFurniture, walls, doors, fixtures

Core Operations

ActionMethod
Add shapeDrag from shape panel to canvas
Add textDouble-click on canvas
Connect shapesHover over shape then drag blue arrow
Clone and connectAlt+Shift+drag from a shape
Add waypointsRight-click connection then Add Waypoint

Connection Styles

StyleDescription
StraightDirect line between shapes
CurvedBezier curve connections
OrthogonalRight-angle connectors (default)
Entity RelationER-style with midpoint routing

Layers

ActionHow To
Add layerEdit then Layers then Add Layer
Switch layerClick layer name in layers panel
Lock layerClick lock icon next to layer
Hide layerClick eye icon next to layer
Move to layerRight-click shape then Move to Layer

Export Options

FormatUsage
.drawioNative editable XML format
.pngRaster image (configurable DPI)
.svgScalable vector graphics
.pdfPrint-ready document
.htmlEmbeddable interactive viewer
.vsdxVisio compatible format

Configuration

URL Parameters (Web Version)

ParameterDescription
?lightbox=1View-only mode
?edit=_blankAllow editing in new tab
?layers=1Show layers panel
?dark=1Dark mode
?grid=0Hide grid

Embedding in HTML

<div class="mxgraph" style="max-width:100%;"
  data-mxgraph='{"highlight":"#0000ff","nav":true,"resize":true,"url":"diagram.drawio"}'>
</div>
<script type="text/javascript"
  src="https://viewer.diagrams.net/js/viewer-static.min.js">
</script>

Advanced Usage

Templates

File then New then From Template to choose from categories including Basic, Business, Engineering, Network, Software, and more.

Confluence Integration

Install the draw.io app from Atlassian Marketplace to insert diagrams directly in Confluence pages with version history tracked through Confluence.

GitHub Integration

Store .drawio files in your repository. GitHub renders a preview of .drawio.svg files. Use GitHub Actions to auto-export diagrams on commit.

VS Code Extension

Extension ID: hediet.vscode-drawio
Allows editing .drawio files directly in VS Code

Troubleshooting

IssueSolution
Shapes not aligningEnable snap to grid: View then Grid
Connection won’t attachZoom in; ensure hovering over blue connection point
File too largeReduce image quality; use SVG shapes instead of embedded images
Fonts different on exportUse web-safe fonts or embed fonts in SVG export
Lost workCheck File then Open Recent; look for auto-saved backups
Slow with many shapesUse layers to hide inactive parts
Import from Visio failingEnsure .vsdx format (not legacy .vsd)
SVG export missing fontsEnable include a copy of the diagram in export settings