Mermaid Live Editor — Online Diagram Editor
Write Mermaid code and watch flowcharts, sequence, class, state, ER and Gantt diagrams render live. Export SVG or PNG. Free and runs in your browser.
Loading Mermaid…
Rendered locally with Mermaid in strict mode. Your code is not uploaded.
How to use
- Type Mermaid code on the left, or pick a starter from Templates.
- The diagram re-renders as you type. Drag to pan, use the zoom controls or Ctrl/⌘ + scroll to zoom, and Fit to frame it.
- Choose a diagram theme, then copy the SVG or download it as SVG or a 2× PNG (Ctrl/⌘ + S).
Example
flowchart LR
A[Request] --> B{Cached?}
B -- Yes --> C[Return cache]
B -- No --> D[(Database)]
D --> CDetails and limitations
Mermaid 12 is downloaded from a public CDN (jsDelivr) the first time you open the editor. Your diagram code never leaves your browser.
Diagrams render with Mermaid's strict security level: labels cannot run scripts and click handlers are disabled. If the code has a syntax error, the last valid diagram stays visible while you fix it.
FAQ
Which diagram types are supported?
Everything Mermaid 12 supports, including flowcharts, sequence, class, state, entity relationship, Gantt, pie, mindmap, timeline, Git graph, journey and quadrant charts.
Why does the PNG look sharper than a screenshot?
The PNG is drawn from the vector SVG at twice its natural size, so it stays crisp on high-density screens and in slides.
Can I use the exported SVG in GitHub or Notion?
Yes. The SVG is a standalone file with a fixed size and background, so it opens in browsers, design tools and documents. GitHub and many wikis can also render the Mermaid code itself.
Related tools
Format references
Tool page updated: