Mermaid live editor

The Mermaid live editor on this site shows the diagram beside the text and updates the preview as you edit. It is free, requires no sign-up, and renders ordinary diagrams in your browser.

Live here means the preview, not an account or a saved project in the cloud. You write Mermaid, the drawing updates, and you export PNG, SVG or PDF or copy a share link. The link uses the same #pako: fragment as mermaid.live, so a link from there opens here after you change the domain, and the other way around.

graph TD and flowchart TD are the flowchart lines people paste most often. Both render. The pages linked below explain the direction token and the node shapes if the preview shows a syntax error instead of a drawing.

Editable example

This sample is a short map of the editor itself. Open it to get an editable copy with the preview, export and share controls. Edits you make in the text box are what the button sends.

graph TD
    A[Open the editor] --> B[Paste graph TD or flowchart TD]
    B --> C[Watch the live preview]
    C --> D[Export PNG, SVG or PDF]
    C --> E[Share a link]

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 example in the Mermaid live editor

Syntax cheat sheet

The live preview is strict about the first line and about punctuation in labels. These rows cover the flowchart cases that fail most often.

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 and flowchart TD in the live editor

The editor accepts both. flowchart TD is the keyword in the current Mermaid documentation. graph TD is the older alias and draws the same top-down flowchart. Paste whichever you already have.

If the preview reports an error, check for a label with punctuation that is not in quotes or a node named end in lowercase. Mermaid reserves that word. A complete Markdown fence around the diagram is accepted; remove extra text outside it. The FAQ lists more fixes.

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 use this Mermaid live editor

Open the free Mermaid live editor, preview graph TD or flowchart TD in the browser, and export or share without signing up.

  1. Open the editor. Go to the Mermaid Drawing editor. The text is on the left and the preview is on the right. No account is required.
  2. Paste or write Mermaid. Paste a graph TD or flowchart TD diagram, or start from an example. The preview renders in the browser without uploading the source for rendering.
  3. Export or share. Export PNG, SVG or PDF from the preview toolbar, or use Share to copy a link. The link contains the diagram code, so anyone who opens it gets an editable copy.

FAQ

What is a Mermaid live editor?

It is a browser editor that renders Mermaid text into a diagram as you type. On this site the text and the preview sit side by side, and export and sharing happen without an account.

Do I need to sign up?

No. Editing, live preview, PNG, SVG and PDF export, and share links are free and do not require an account. An optional AI assistant uses your own API key if you choose to turn it on.

Can I share a diagram without uploading it?

Yes. Share copies a link with the compressed diagram in the URL fragment. Nothing is sent to a file store. The latest draft is also kept in this browser’s local storage.

Use a syntax page when you want the first line explained, or the FAQ for export, privacy and share links.