What is Mermaid?
Mermaid is a JavaScript library that draws diagrams and charts from a text syntax. It covers flowcharts, sequence diagrams, pie charts, class diagrams, and other types.
What diagram types are supported?
Mermaid supports flowcharts, sequence diagrams, class diagrams, state diagrams, entity-relationship diagrams, Gantt charts, Git graphs, user journey diagrams, and pie charts.
Can I export diagrams?
Yes. Export a diagram as a PNG at 1x to 4x scale or as an SVG, or copy it as an image. To save everything at once, download a ZIP with a PNG, an SVG and the .mmd source for every diagram. Very large diagrams are capped at your browser's canvas limit, and the tool tells you when that happens.
How do I import a diagram?
Paste text into the editor, upload a .md, .mmd or .txt file, or import from a URL such as a file on GitHub. The tool finds every diagram in the text, whether it's in fenced mermaid code blocks, copied from ChatGPT or Claude, or plain Mermaid code, and gives each one a tab named after the heading above it.
Is my code sent to a server?
No. Diagrams render in your browser, and your draft is saved in your browser too. Share links keep the whole document in the part of the link after the #, which browsers never send to a server. The one exception is importing from a URL: our server fetches that file for you, because browsers block many cross-site requests.
What themes are available?
Match site, Light, Dark, Neutral and Forest, plus a hand-drawn look. Your browser remembers your choice.
Why does my diagram show an error?
The error names the line in your document and highlights it in the editor. Two common mistakes have one-click fixes: semicolons in sequence diagram messages, and curly quotes pasted from a word processor or chat app.
How do I make a big flowchart fit?
Switch to the compact layout. It arranges large flowcharts more tightly. On a 40-node architecture diagram it cut the width from 4542 to 2916 pixels. A minimap appears on large diagrams so you can move around them.
Can I open a mermaid.live link?
Yes. Share links use the same format as mermaid.live, so you can paste a mermaid.live link to import its diagram.