1. Home
  2. Developer tools
  3. Mermaid Diagram Editor

Mermaid Diagram Editor

Sketch a process, an API call sequence or a project plan in text, and get a diagram you can paste into docs, slides or a pull request.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Mermaid Diagram Editor

  1. Pick a template or paste Mermaid code.
  2. Edit the text; the preview redraws as you type.
  3. Download SVG or PNG, or copy the code as a Markdown block.

Features

  • Mermaid 11: flowchart, sequence, class, state, Gantt, pie and mind map
  • Error messages with the failing line
  • Light or dark theme to match your system
  • SVG and 2× PNG export
  • Strict security level, sanitised output

Supported formats

Input

  • MMD
  • Typed or pasted text

You get

  • SVG
  • PNG
  • MD

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Mermaid Diagram Editor is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Click handlers, links and HTML labels are disabled for security.

Guide

Writing diagrams as text with Mermaid

Mermaid lets you describe a diagram in a few lines of text and have it drawn automatically. Because the source is plain text, diagrams live next to the code, show up in diffs and are easy to update, which is why GitHub, GitLab, Notion and many documentation tools render Mermaid natively. This editor redraws the diagram as you type and exports it as SVG or PNG for places that do not.

How the syntax works

Every diagram starts with its type on the first line. A flowchart begins with flowchart TD (top-down) or LR (left to right), then lists nodes and arrows: A[Order placed] --> B{Payment OK?}. The bracket style sets the shape: square brackets for boxes, braces for decisions, round brackets for rounded boxes and [(...)] for a database cylinder. Text on an arrow goes between dashes, as in B -- Yes --> C. Indentation is optional but makes larger diagrams readable.

The diagram types in the templates

The Sequence template shows participants exchanging messages, with ->> for calls, -->> for replies and alt/else blocks for branches. Class diagrams list attributes and methods and draw composition and association. State diagrams model a lifecycle with [*] as start and end. Gantt charts take tasks with dates or durations and dependencies written as after w. Pie charts take labelled values, and mind maps use indentation alone to build the tree.

Live preview and errors

The preview redraws a moment after you stop typing. When the code has a mistake, Mermaid’s own parse error appears above the preview, usually naming the line and the token it did not expect, and the last drawing that worked stays on screen so you keep your bearings while fixing it.

A worked example

The Flowchart template describes an order process. A[Order placed] leads to the decision B{Payment OK?}, which branches to C[Reserve stock] on Yes and to D[Email customer] on No. C continues to a database node E[(Orders DB)] and a rounded F([Ship within 24 h]), while D leads to G[Cancel after 3 days]. The rendered SVG contains every label, including “Payment OK?”, and the SVG button saves it as diagram.svg.

Security and privacy

Diagrams pasted from elsewhere can contain links and click handlers. The editor runs Mermaid at its strict security level, which disables clicks, links and HTML labels, and then sanitises the generated SVG before showing it, so a diagram cannot run code on the page. The code you write is kept only in this browser’s storage, so a reload brings it back.

Where automatic layout stops

Mermaid places nodes for you, which is the point, but it offers limited control: you cannot drag a node or pin coordinates. For dense graphs, split the diagram, change the direction or use subgraphs. When you need a specific layout engine or fine control over ranks, Graphviz is the better tool.

Keeping diagrams maintainable

Give nodes short ids and put the readable text in the label, as in pay{Payment OK?}, so you can rename a step without touching every arrow that points to it. Group related steps in subgraph blocks with a title, and keep one diagram per idea rather than one giant chart; several small diagrams in a document are easier to update and review than a single dense one.

Checked against the current version of the Mermaid Diagram Editor on .

Troubleshooting

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

How do I put a line break or special character in a label?

Wrap the label in double quotes, for example A["Order #1: paid"], so characters such as parentheses, colons and the hash sign are treated as text. Inside a quoted label, a br tag starts a new line and #quot; stands for a double quote.

Why does my diagram look different on GitHub?

GitHub uses its own Mermaid version and theme, and it renders with its own fonts and width. Layout follows the same rules, but spacing, colours and very new syntax can differ. Check the final rendering in the place your readers will see it.

Will the same code render on GitHub?

Yes for the common diagram types: GitHub renders mermaid code blocks in Markdown files, issues and pull requests. GitHub may run a slightly different Mermaid version, so very new syntax can lag behind.

Why do click links in my diagram not work?

The editor uses Mermaid’s strict security level, which disables click handlers and links so that pasted diagrams cannot run code on the page.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.