Mermaid flowchart online

A Mermaid flowchart is a process drawing written as text. The first line is flowchart TD or graph TD, and each following line is a step or an arrow.

That is the whole model: you describe the process, the editor draws it, and you export a picture for a doc that does not run Mermaid. Product notes, onboarding steps and request handling all fit this shape.

This page is about drawing the flowchart, not about memorising every diagram type. When you need sequence, class, state, ER, Gantt or pie charts, the syntax guide has an editable example of each.

Editable example

The example is a review loop: write the flowchart, look at the preview, and either export or go back. Edit the text box to use your own step names, then open it in the live editor.

flowchart TD
    A[Describe the process] --> B[Write flowchart TD]
    B --> C[Check the live preview]
    C --> D{Looks right?}
    D -->|Yes| E[Export PNG or SVG]
    D -->|No| B

The link opens the example printed above. If you change the text box, the button sends your edited copy to the editor instead.

Open this Mermaid flowchart in the live editor

Syntax cheat sheet

You only need a few shapes to draw a readable flowchart. Quote a label when it contains punctuation.

Mermaid flowchart syntax
SyntaxMeaning
graph TDStart a top-down flowchart. graph is the older keyword, and it still renders.
flowchart TDStart a top-down flowchart with the keyword used in the current Mermaid documentation.
TD / TB / BT / LR / RLDirection after the keyword: top-down, top-to-bottom, bottom-to-top, left-to-right, or right-to-left.
A[Text]A rectangular step.
B{Text}A decision diamond.
C(Text)A rounded node.
A --> BAn arrow from A to B.
A -->|Yes| BAn arrow with a label on it.
A["Text (note)"]Put quotes around a label that contains parentheses or other punctuation.

graph TD or flowchart TD for a Mermaid flowchart?

Either one. flowchart TD is the keyword in the current Mermaid documentation. graph TD is the older alias and still draws the same top-down flowchart. Pick flowchart TD for new work, and leave old graph TD snippets alone.

The rest of the file does not care which keyword you used. Rectangles, diamonds and arrows mean the same thing after both.

graph TD compared with flowchart TD
Comparisongraph TDflowchart TD
Keywordgraph, an older alias that still rendersflowchart, the keyword in the current docs
DirectionTD, top to bottomTD, top to bottom
LayoutTop-down flowchartThe same top-down flowchart
When to use itKeep it on diagrams you already havePrefer it when you write a new diagram

How to create a Mermaid flowchart online

Turn a process into a Mermaid flowchart, preview it live, and export PNG, SVG or PDF without signing up.

  1. Write the process in text. List the steps in order. Mark decisions separately from ordinary steps so they can become diamonds.
  2. Turn the list into flowchart TD. Start with flowchart TD or graph TD, then write each step as a node and each hand-off as an arrow. Label the yes and no branches.
  3. Export a picture or share the text. Use the live preview to check the layout. Export PNG for slides, SVG for a sharp vector, or PDF to print. A share link carries the source in the URL and does not upload it.

FAQ

How do I make a flowchart in Mermaid?

Start with flowchart TD, add a node for each step, and connect them with arrows. Open the text in the editor on this site to see the live preview, then export PNG, SVG or PDF.

Can I start a Mermaid flowchart with graph TD?

Yes. graph TD and flowchart TD both draw a top-down flowchart. flowchart matches the current Mermaid documentation. graph still works and does not need to be replaced.

How do I save the flowchart as an image?

Choose Export Drawing in the editor. PNG suits slides and documents, SVG stays sharp at any size, and PDF is the print format. You can also copy the image to the clipboard.

Is the flowchart uploaded to a server?

Ordinary rendering happens in your browser without sending the diagram to our servers. Share links carry the compressed source in the URL, so anyone with the link can view it. If you use the optional AI assistant, your browser sends relevant content to the provider you select.

If you already know which first line you need, use the syntax page. If you want the editor itself, open the live editor.