Try the demo — no account needed

Signs you in as a read-only demo user. Your changes reset every night at 03:00 Madrid — draw freely.

Read the wiki · Language spec
Demo video coming soon

Anatomy of a DrawLang program

How 12 lines become an AND-gate block. DrawLang has no shapes library, no drag-and-drop palette baked into the language itself — just a pen that moves and marks. Everything else (symbol libraries, editors, FUP/P&ID conventions) is built on top of that pen.

ma,40,40;
rt,80,60,f,c2;
ma,20,65;
dl,20,0;
ma,20,55;
dl,20,0;
ma,120,70;
dl,20,0;
ma,15,65;
ci,3,f,c1;
ma,15,55;
ci,3,f,c1;
ma,145,70;
ci,3,f,c1;
tz,14;
ma,58,63;
tx,0,AND;
AND
Rendered from the exact program on the left — no post-processing.
  • ma,40,40move the pen (absolute) to (40, 40)
  • rt,80,60,f,c2filled 80×60 rectangle in palette colour 2
  • ma / dlmove, then draw a relative line — the three connector stubs
  • ci,3,f,c1filled circle of radius 3 — the three ports
  • tz,14 / tx,…set text size 14, then draw label at rotation 0

Same interpreter, three backends. The exact same program renders identically to SVG, PostScript, and PDF. Nothing in the program above knows or cares which one you pick.

Change the fill colour from c2 to another palette entry and you get a different block — no code changes anywhere else:

c1black c2red c3blue c4green c5orange

Full write-up on r/drawlang.

DrawLang spec v0.7 · open source

A small language for control-system drawings.

Every DCS drawing system has the same shape underneath: a compact list of pen instructions in a database, and a renderer that turns those instructions into paper. The database is the source of truth. The rendered page is disposable. DrawLang is that language, made explicit — small, frozen, and human-readable.

The language

7 core opcodes, frozen forever, plus 4 additive extensions. Two-letter mnemonics, comma-separated args, semicolon-terminated. A whole drawing is a flat text program. No hidden primitives, no vendor extensions.

The editor

Open-source web editor for A3 FUP frames with 28×14-cell grid coordinates. Drop pre-built symbols, save your own library, edit statement-by-statement, or type plain English (“move right 20”, “line down 30”).

The idea

Drawings you make are plain-text programs you can commit to git, diff, template, and round-trip through any compliant interpreter forever. No cloud lock-in. No vendor account. SQLite behind a public API.

# draw a labeled 14×1 line — this is a valid DrawLang program
mr,0,158;
dl,14,0;
mr,0,-1;
dl,-14,0;
tz,8;
tx,0.,A1;

The 11 opcodes

mrmove relative
mamove absolute
dldraw line
rtrectangle
cicircle
tztext size
txtext
ararc
bzBézier curve
spspline
imimage reference

Sign in

Access your DrawLang editor account.

Try the demo: username demo, password demo. Resets every night — draw freely.
No account? Request access