Free Mermaid Live Editor Online

A free online Mermaid editor and viewer. Type Mermaid code on the left and the chart renders live on the right: flowcharts, sequence diagrams, ER diagrams, Gantt charts and more. Export Mermaid to PNG or SVG in one click. No sign-up.

Online Mermaid viewer and renderer

Got a Mermaid chart in a README, a pull request or an AI answer? Paste the code into the editor above to view it instantly. The Mermaid renderer redraws the preview as you type, so you can tweak labels and arrows and see the result right away.

  • Diagrams render in your browser; only AI generate and fix send your text, through our server, to DeepSeek
  • Clear syntax error messages, usually with the line number
  • Your last diagram is restored when you come back

What is Mermaid?

Mermaid is a text-based diagram language. Describe who connects to whom and the layout is done for you, so editing a diagram is as easy as editing text.

Standard Mermaid syntax

Code you write here works anywhere Mermaid is supported, including GitHub, GitLab and most Markdown editors.

How to make a Mermaid flowchart

  1. Pick a directionStart with flowchart TD (top to bottom) or flowchart LR (left to right).
  2. Add nodesGive each node a short id and a label, like A[Start]. The brackets set the shape.
  3. Connect themLink nodes with -->, and label an arrow with -- Yes -->.
flowchart LR
  A[Box] --> B(Rounded)
  B --> C{Decision}
  C -- Yes --> D((Circle))
  C -. No .-> E[[Subroutine]]
  subgraph Group
    D --> F[(Database)]
  end

Mermaid sequence diagram example

Sequence diagrams show how systems talk to each other over time. List the participants, then write one message per line: ->> draws a solid arrow for a request and -->> a dashed arrow for a reply.

Load the Sequence example above to edit this diagram live, or try an ER diagram for database tables.

sequenceDiagram
  participant User
  participant Server
  User->>Server: Send login request
  Server-->>User: Return token
  User->>Server: Request data with token
  Server-->>User: Return data

Mermaid syntax cheat sheet

The first line picks the diagram type. These are the forms you will use most.

DiagramFirst lineCommon syntax
Flowchartflowchart TDA[Text] --> B{Decision} A -.-> B A ==> B
Sequence diagramsequenceDiagramUser->>Server: request Server-->>User: reply
Class diagramclassDiagramAnimal <|-- Dog +eat()
State diagramstateDiagram-v2[*] --> Draft Draft --> Published: approve
ER diagramerDiagramCUSTOMER ||--o{ ORDER : places
Gantt chartganttdateFormat YYYY-MM-DD Task :a1, 2026-01-05, 5d
Pie chartpie title Title"Search" : 45
MindmapmindmapIndentation sets the level, root((Center))

Flowchart shapes and arrows

ResultSyntax
Box / rounded boxA[Text] A(Text)
Diamond (decision)A{Text}
Circle / databaseA((Text)) A[(Text)]
Solid / dotted / thick arrow--> -.-> ==>
Arrow with a labelA -- text --> B or A -->|text| B
Group (subgraph)subgraph Name … end
Comment%% this line is not drawn

Export Mermaid to PNG and SVG

Turn any Mermaid chart into an image for slides, docs, tickets or chat.

PNG2x resolution on a white background, sharp on retina screens, in docs and slides
SVGVector image that scales without blur and can be edited further
Mermaid codeCopy the code into GitHub or GitLab docs
MarkdownCopy a ready-made ```mermaid code block

Mermaid diagrams in Markdown

Writing docs? In the MarkdownEdit Markdown editor, add a ```mermaid code block and the diagram previews right next to your text. Export the whole document to PDF, Word or HTML with the diagrams included.

Open the Markdown editor
## Release flow

```mermaid
flowchart LR
  Write --> Review --> Publish
```

FAQ

What is Mermaid?

Mermaid is a text-based diagram language. You describe a flowchart, sequence diagram or Gantt chart in a few lines of code and Mermaid draws it for you. It is open source, and GitHub, GitLab and many Markdown editors render Mermaid diagrams natively.

Is this Mermaid live editor free?

Yes. It is free and needs no account. Diagrams are rendered in your browser.

How do I convert Mermaid to PNG?

Once the diagram renders, click Download PNG below the preview. The PNG is exported at 2x resolution on a white background. Click Download SVG instead if you need a vector file that stays sharp at any size.

Which Mermaid diagram types can I draw?

Flowcharts (flowchart), sequence diagrams (sequenceDiagram), class diagrams (classDiagram), state diagrams (stateDiagram-v2), ER diagrams (erDiagram), Gantt charts (gantt), pie charts (pie) and mindmaps (mindmap). The buttons above the editor load a working example of each.

Is this the official Mermaid Live Editor?

No. MarkdownEdit is an independent tool built on the open-source Mermaid library and is not affiliated with the Mermaid project. Diagrams use standard Mermaid syntax, so code you write here works anywhere Mermaid is supported.

Is my Mermaid code saved?

Yes, it is saved automatically in your browser's local storage, so it is still there after a reload. It is not uploaded to a server, except when you click Generate with AI or Fix with AI: then your description or code is sent through our server to the DeepSeek model for processing. Copy it somewhere safe before switching devices.