Mermaid Live Editor
Text to Diagram, SVG and PNG

Type Mermaid, see the diagram. Flowcharts, sequence, class, state, ER, Gantt, pie, mind map, timeline and Git graph templates, four themes, zoom and pan, SVG and PNG export at up to 4x, and a share link that keeps your diagram in the URL fragment. 100% client-side. Zero data stored.

Mermaid Live Editor illustration: Mermaid code above the flowchart it draws

Mermaid Live Editor Tool

100% client-side. The drawing engine (about 1.1 MB over the network) loads once, when you start typing or click Render.

0 lines, 0 characters. The preview updates a moment after you stop typing.

Preview

100%

Drag to pan. Zoom with the buttons, or hold Ctrl and use the mouse wheel. Click the preview and press + - 0 or the arrow keys.

Export and Share

Render a diagram to enable the downloads.

The share link holds your compressed diagram text after the # sign. Browsers never send that part of a URL to any server, so nobody receives it unless you send them the link. Diagrams run in Mermaid's strict security mode: links, click actions and scripts in labels are disabled.

Common Use Cases

README and Docs Diagrams

Draft the diagram here, check it renders, then paste the text into a fenced mermaid block in your README, wiki or docs site.

Architecture and API Flows

Sketch a request through your services as a sequence diagram, or a deployment pipeline as a flowchart, before it goes in a design review.

Database Models

Describe tables, keys and relationships as an entity relationship diagram, and export an SVG for the schema document.

Plans and Timelines

Turn a project plan into a Gantt chart or a company history into a timeline, then download a PNG for the slide.

Share Without a Server

Send a colleague a link that opens your exact diagram. It lives in the URL fragment, so no account, upload or server is involved.

Learn Mermaid Syntax

Start from a template for each diagram type, change a line and watch the picture change. Parse errors name the line to fix.

Mermaid Syntax Quick Reference

Flowchart Shapes and Links

Write You get
A[Text]Rectangle
A(Text)Rounded rectangle
A{Text}Diamond (a decision)
A((Text))Circle
A --> BArrow from A to B
A --- BLine without an arrowhead
A -.-> BDotted arrow
A -->|label| BArrow with text on it

First Line of Each Diagram Type

Diagram Starts with
Flowchartflowchart TD
SequencesequenceDiagram
ClassclassDiagram
StatestateDiagram-v2
Entity relationshiperDiagram
Ganttgantt
Piepie
Mind mapmindmap
Timelinetimeline
Git graphgitGraph

Themes

Default, Neutral (good for print), Dark and Forest. Your own frontmatter or a theme directive in the text wins over the menu.

PNG limits

A PNG is capped at 16,384 pixels on a side and 100 megapixels, so a very large diagram at 4x is scaled down and the note says so.

Strict mode

Click actions, links and HTML in labels are turned off on purpose, so a diagram from someone else cannot run code in your browser.

Size limits

Mermaid reads up to 50,000 characters and 500 connections per diagram. Past that it refuses, and the editor tells you.

Frequently Asked Questions

Why We Built the Mermaid Live Editor

Diagrams that live as text are easy to review, diff and keep next to the code, and Mermaid has become the usual way to write them in READMEs and design docs. The catch is that you cannot see a mistake until it is committed and rendered somewhere else. A live editor closes that loop: type, look, fix, and only then paste.

This editor draws as you type, keeps the last good diagram on screen when a line has a typo, and tells you which line to fix. You can zoom and pan large diagrams, export an SVG that opens everywhere or a PNG at up to 4x with a white or transparent background, and send a share link whose diagram text sits in the URL fragment, which browsers never send to a server. Everything runs in your tab, in Mermaid's strict security mode.

The Mermaid Live Editor is part of RJL.io's collection of free developer tools. Write the surrounding document in the Markdown Viewer, compare two versions of a diagram with the Diff Checker, or format a payload with JSON Tools.

Is your site ready for Google and AI search?

The free SEO Analyzer checks any page in seconds - meta tags, structured data, AI crawler access - and tells you exactly how to fix each issue on your platform.