Pikkola Diagram Lab, tool No. 65

Draw the thought, keep the text.

A diagram is written as plain text. It is drawn in this tab while you type, checked line by line, and taken out as SVG, a 2 or 3 times PNG, a Markdown block or a link that carries the whole source. Nothing is uploaded.

8
plates to start from
0
requests sent
SVG, PNG, MD
three ways out

Engine 11.17.2, bundled with the page. No CDN, no account, no cookie.

The studio

Source left, plate right

Type or paste Mermaid. The preview follows every pause, keeps the last good plate while a line is broken, and marks the line that stopped the parser.

ready

flow engine 11.17.2

Source

Before the parser 0

Plate

Nothing drawn yet

Write a diagram or load a plate. Every diagram opens with a line such as flowchart LR or sequenceDiagram.

drawn in this browser
Tab adds two spaces

Plates

Eight plates, all text

Load one and read how the syntax is shaped. Every plate lands in the same box, so none of them is a fixed template.

01

A week, from idea to numbers

A flowchart with one decision and a loop back to the draft.

flowchart
02

Checkout, end to end

Four actors, a parallel block, a failure branch and a note.

sequence
03

A small shop's schema

Four entities, keys, cardinalities and a join table.

ER
04

Launch week

Three sections, a milestone and a task that starts after another.

gantt
05

A publishing model

An abstract base class, two subclasses and a one to many relation.

class
06

An order's life

A composite state with its own entry and exit.

state
07

Where a build week goes

Five slices with the numbers shown.

pie
08

A tool, over four weeks

Four periods with two notes each.

timeline

Syntax

Six diagram types, one grammar

The first line chooses the type. Every line after it is structure: a node, an arrow, a field, a date.

Flowchart

flowchart

Steps and decisions. graph and flowchart are the same keyword.

flowchart LR
  Idea --> Sketch
  Sketch --> Ship

Sequence

sequence

Who says what, in order, with loops and alternatives.

sequenceDiagram
  Alice->>Bob: Can you read this?
  Bob-->>Alice: Yes, and edit it

ER diagram

erDiagram

Tables, keys and cardinality, drawn from the data model.

erDiagram
  AUTHOR ||--o{ BOOK : writes
  BOOK ||--o{ COPY : edition

Gantt

gantt

Time on the horizontal axis, work as bars.

gantt
  title Two weeks
  dateFormat YYYY-MM-DD
  Write :a1, 2026-11-02, 4d

Class

classDiagram

Types, members and the relations between them.

classDiagram
  class Note {
    +String body
    +save() void
  }
  Note <|-- Draft

State

stateDiagram-v2

The states of one thing, and the events that move it.

stateDiagram-v2
  [*] --> Draft
  Draft --> Sent: send
  Sent --> [*]

The same engine also reads timeline, gitGraph, mindmap, journey, quadrantChart, xychart, sankey, block, packet, C4, requirement and architecture diagrams.

House rules

Three rules this page keeps

They are also the reason it runs without a server.

01

Text is the source

A diagram kept in a repository can be diffed, reviewed and merged like code. The picture is an output, not the file you are stuck with.

02

Nothing leaves the tab

The engine is bundled with the page and the content policy sets connect-src to none. A diagram with a customer name in it stays as private as the text you would have written.

03

The link carries the diagram

Sharing packs the source into the address after the hash, compressed here and expanded on the other side. The server never receives it, and there is nothing to expire.

Questions

Is my diagram uploaded?

No. The content policy sets connect-src to none, so a request cannot leave the page. Your source is kept in this browser's local storage so it opens where you left it, and clearing site data for this domain removes it.

Which diagram types can I write?

Eighteen families: flowchart, sequence, class, state, entity relationship, gantt, pie, timeline, git graph, mindmap, journey, quadrant, xychart, requirement, C4, sankey, block and packet. The plates cover eight of them, and the rest are drawn the same way.

How is the PNG made?

The drawn SVG is turned into an image inside the tab and painted on a canvas at 2 or 3 times its size. The background follows the diagram theme, so a dark plate does not arrive on a transparent square.

Does the preview disappear when I make a mistake?

No. It keeps the last plate that parsed, dims it, and names the line that stopped the parser with the mistake that line usually carries. The same line is marked in the gutter of the editor.

Can I paste a diagram from a README?

Yes. Code fences are removed on the way in, so a block copied from a Markdown file goes straight into the editor. Copying it back out adds the fences again.

Which engine is it?

Mermaid 11.17.2 under the MIT licence, bundled at vendor/mermaid.min.js. No CDN is contacted and the file is served from this domain with the rest of the page.