Diagrams as code,
with a canvas you
are allowed to touch.
You write Mermaid, Graphviz, D2 or PlantUML. ZDraft draws it. Then you grab the box auto-layout put in a stupid place and move it — and the move stays, in a small readable file next to your source.
Both halves of diagramming fail, in mirror images.
Reviewable. Unmovable.
Mermaid, Graphviz, D2 and PlantUML live in your repository and render on GitHub. But layout control is essentially nil — auto-layout puts two nodes on top of each other and there is nothing you can do about it.
Movable. Unreviewable.
draw.io and Excalidraw give you total control of the picture and produce a blob no reviewer can read in a diff. "Updated the diagram" is the whole changelog anyone will ever get.
Drag it. It stays. Your source never moves.
Grab a box and it tracks your cursor exactly — no spring, no lag. Let go and it is pinned: amber in every theme, meaning one thing only, that you overrode the layout here.
A faint outline stays where auto-layout wanted it, with a thin line back to it, so you can see exactly how far you have overridden the engine. Click the ghost and it goes back.
A pin survives an edit to an unrelated part of the file. Identity comes from the declared id, never from position — rename a node and the pin follows it. Delete the sidecar and you are back to pure auto-layout, with no cache anywhere that has to agree.
flowchart TD Orders["Orders"] Payments["Payments"] ledger[("ledger")] Orders --> ledger Payments -.-> ledger
version = 1 [pins.Orders] x = 420 y = 25 [pins.ledger] x = 670 y = 85
Write it in whichever language your repository already speaks.
Chosen per file, or from the extension. Dragging, pinning, annotating and exporting work identically in all four — and ZDraft never rewrites your source into a language of its own.
digraph architecture { rankdir=LR; node [shape=box, style=rounded]; gateway [shape=hexagon, label="API Gateway"]; db [shape=cylinder, label="Postgres"]; gateway -> api [label="HTTP"]; api -> db [label="SQL"]; }
Bundled as WebAssembly. Exact
geometry including edge splines, and it renders identically on a machine with no
Graphviz installed. .dot,
.gv
flowchart TD Orders["Orders"] Payments["Payments"] n3DS{"3DS?"} Orders --> ledger Payments -->|"risky"| n3DS
The one most repositories already
have. Flowchart, state, class, ER and sequence. Pinned to a version and held to a
fixture corpus, so an upgrade cannot move your diagrams quietly.
.mmd, .mermaid
direction: right web: Storefront db: Ledger { shape: cylinder } services: { orders: Orders } web -> services.orders -> db
Bundled as WebAssembly.
Containers, classes and SQL tables. Renaming understands scope — a node written
orders inside a block and
services.orders outside it is one node, and
both change. .d2
@startuml actor Customer component "Storefront" as web database "Orders" as db Customer --> web : browses web --> db : write order @enduml
The one that is not bundled.
It needs Java, and 30 MB in every installer for an engine most people never open is
not a trade ZDraft makes. Settings finds it, or installs it for you in one click.
.puml, .plantuml,
.pu, .iuml
Two families, and a safety valve
| Graph | Flowchart, state, ER, class, C4, deployment, org chart. Pinning means free 2-D position plus edge waypoints. |
| Sequence | Drag a lifeline header to reorder the columns — the single best fix for crossing messages. Also lifeline gap and message spacing. |
| Everything else | Gantt, pie, mindmap, journey, timeline, git graph, quadrant, Sankey — rendered exactly as their engine draws them, with a banner saying why they cannot be dragged. |
ZDraft never chokes on a file. An unmodelled diagram type degrades to a viewer rather than an error.
An editor, not a viewer with buttons.
Source and canvas are one document
Click a box and the cursor jumps to the line that declares it. Move the cursor and the node highlights. Neither pane is a preview of the other.
Pins are never lost quietly
A pin whose node no longer exists shows up in the Pins list with a one-click repair: point it at the renamed node, or drop it. Subgraphs pin too: drag a corner and the box keeps that size.
Diagnostics that name the fix
Parse errors with a line to jump to. Overlapping boxes with a right-click that separates them. Drift warnings when a pin has started fighting the layout.
Compare with the last commit
Added, removed, renamed and moved, drawn over the diagram itself. Not "the file changed" — you added a queue and renamed the database.
Presentation mode
F5 reveals the diagram a step at a time, full screen, with your notes and highlights. It is the drawing itself, not an export of it.
Mark it up without touching the source
Notes that follow the box they point at, arrows, highlights and freehand ink. All of it lives in the layout file — your diagram source never sees it.
Export that holds up
SVG with the text left alone, the font embedded, or drawn as outlines. PNG to 6×. PDF as real vector. Or a picture straight to the clipboard.
Diagrams inside markdown
Open a .md and every fenced diagram in it becomes editable, each keeping its
own layout in one shared sidecar.
A command line that shares the renderer
zdraft render docs/*.mmd and zdraft watch produce byte-identical
output to the app, because it is the same engine.
Import what you already drew
draw.io XML and Excalidraw JSON come in with every box pinned exactly where its author put it — then the file becomes text you can review.
Ten themes, and your own colours
Four for the app, six for the diagram, and a fill and outline for any box or subgraph. All of it is stored in the layout file, so it looks the same wherever it is opened.
Nothing leaves your machine
No account, no telemetry, no sync, no cloud. The only network request ZDraft can make is downloading PlantUML — and only when you press that button.
Quiet chrome. The diagram gets the colour.
A drafting table, not a toy: nothing on screen competes with the drawing.
Free forever. No account, no trial, nothing gated.
Linux
.deb for Debian, Ubuntu and Mint; .rpm for Fedora and openSUSE. On another distribution, build it from source.
Verify what you downloaded against
SHA256SUMS —
sha256sum -c SHA256SUMS.sha256
New in 0.5.0
| Resizable subgraphs | Drag the handle on a subgraph's bottom-right corner to give it the size you want. From then on it keeps that size, however you move what is inside it. |
| Moves as one | Dragging the subgraph, or nudging it with the arrow keys, takes the resized box along with everything inside. |
| Stored as a pin | The size sits in the layout file next to the other pins, never in your source. Ctrl+Z undoes it, and a double-click on the handle lets the box size itself again. |
| Since 0.3.0 | Fill and outline for nodes and subgraphs, and line colours for edges, with text that stays readable on any fill. |
Every change, including the smaller fixes, is in the changelog.
What you need installed
| Nothing | Graphviz, Mermaid and D2 are compiled into the app. Nothing is downloaded and nothing is fetched at runtime. |
| Java, optionally | Only if you want PlantUML. Settings will find an existing plantuml.jar, or install one for you. |
The ones worth answering.
Does my diagram still work on GitHub?
Yes. ZDraft never rewrites your source to store layout, so a Mermaid file stays a Mermaid file and GitHub renders it exactly as before. Copy source for GitHub in the export dialog hands you the file verbatim.
What happens if I delete the layout file?
The diagram goes back to pure auto-layout. There is no cache, no database and no hidden state that has to agree with it — that is the whole point of keeping layout in one readable file beside your source.
Can I use ZDraft without ever dragging anything?
Yes. It is a perfectly ordinary diagram editor with live preview, four engines, templates and export. The layout file is only created when you actually move something.
How do several people work on one diagram?
Normally, through git. The source is text and the layout is text, so both merge. When two people move the same node you get a four-line conflict you can read — and ZDraft can resolve it visually on the canvas rather than making you edit coordinates by hand.
Does anything leave my machine?
No. There is no account, no telemetry and no sync. The only network request ZDraft can make is downloading PlantUML, and only when you press that button. It works entirely offline.
Is it really free?
GPL-3.0-or-later, free forever, no paid tier and nothing gated. The source is public. Donations are welcome and change nothing.
What if I switch files before saving?
ZDraft asks first — save, discard or stay where you are. A drag is written to the layout file as you make it; if you would rather it waited for Ctrl+S with the source, turn off Save layout as you go in Settings.
What about macOS?
Not a target. Linux and Windows are.