Type or paste Mermaid syntax and get a live diagram — flowchart, sequence, class, and more. Export to SVG, PNG, or draw.io XML. 🔒 100% local — nothing is uploaded
PNG export requires a modern browser. draw.io XML can be imported via File → Import From → XML in draw.io / diagrams.net.
This tool runs Mermaid.js entirely inside your browser — your text never leaves your device.
| Syntax | What it produces |
|---|---|
| flowchart TD | Top-down flowchart (TD = top-down, LR = left-right, RL, BT) |
| A[Label] | Rectangle node named A with text "Label" |
| B(Label) | Rounded rectangle (stadium) node |
| C{Label} | Diamond / decision node |
| D((Label)) | Circle node |
| A --> B | Arrow from A to B (solid) |
| A -->|text| B | Arrow with label text |
| A --- B | Line without arrowhead |
| A -.-> B | Dotted arrow |
| subgraph Title ... end | Group nodes in a labeled box |
| sequenceDiagram | Sequence diagram header |
| Alice->>Bob: Message | Solid arrow message in sequence diagram |
| Bob-->>Alice: Reply | Dotted arrow message (return) |
| classDiagram | UML class diagram header |
| stateDiagram-v2 | State machine diagram |
| erDiagram | Entity-relationship diagram |
| gantt | Gantt / timeline chart |
A --> B draws an arrow from node A to node B. This makes diagrams easy to version-control, write in any text editor, and generate programmatically. Mermaid is now natively supported in GitHub, GitLab, Notion, Obsidian, and many other tools, so your text diagram is instantly portable across platforms..xml file, or "Copy XML" to copy it to your clipboard. In draw.io / diagrams.net (the free desktop or web app), go to File → Import From → XML (or Extras → Edit Diagram) and paste the XML. Your diagram will appear as fully editable shapes. Note: because draw.io's native format differs from Mermaid's render graph, the exported XML uses a flow-compatible mxGraph encoding — you may want to rearrange the auto-layout after importing.flowchart TD); (2) using special characters in node labels without wrapping them in quotes — try A["Label with (parens)"]; (3) using reserved Mermaid keywords as node IDs — rename the node; (4) forgetting to indent subgraph contents. The error message shown below the editor will usually point to the offending line.