Mermaid Diagram Editor

Write Mermaid code for flowcharts, sequence, class, state, Gantt and ER diagrams and see the diagram as you type, then download it as SVG.

Processed on your device. Files are not uploaded

How to draw a diagram with Mermaid

  1. Write the code

    Start with flowchart, sequenceDiagram, classDiagram, erDiagram, gantt or stateDiagram, or press Try an example.

  2. Watch the preview

    The diagram is drawn as you type; errors point to the line.

  3. Download

    Save the diagram as SVG, or copy the code into Markdown.

When to use Mermaid Diagram Editor

You need a flowchart, sequence diagram or timeline for docs and want it to be easy to change later.

A diagram in a README is not drawing on GitHub and you want to find the syntax error.

Tips for a better Mermaid Diagram Editor result

Keep node ids short and put long text in the labels, such as A[Customer places order], so the code stays readable.

Pick the neutral theme for diagrams that will be printed or shown on both light and dark pages.

Mermaid Diagram Editor: limits and what to check

Mermaid changes between versions, so a diagram drawn here may look slightly different on a site that uses an older version.

Very large diagrams become hard to lay out automatically; split them into smaller diagrams that each tell one part.

About Mermaid Diagram Editor

Mermaid turns short text into diagrams, so they live in version control next to the code and are easy to update. GitHub, GitLab, Notion and many docs tools draw Mermaid blocks directly. The diagram is drawn by the Mermaid library in your browser with strict security, so links and scripts in the code cannot run.

FAQs

Which diagram types are supported?

All of Mermaid's: flowcharts, sequence, class, state, ER, Gantt, pie, mindmap, timeline, git graph, journey and more.

How do I get a PNG?

Download the SVG and open it in SVG to PNG Converter, which can scale it up for sharp images.

Why does my diagram show an error?

The error names the line. Common causes are spaces in node ids and special characters in labels: put such labels in quotes.

Related tools