Mermaid Diagram Renderer
Render Mermaid diagram code, such as flowcharts, sequence diagrams, class diagrams, state diagrams, Gantt charts and pie charts, to an SVG or a high-resolution PNG, in the default, neutral, dark or forest theme.
Frequently asked questions
What is Mermaid?
A text syntax for diagrams: you describe nodes and connections in lines of code and Mermaid draws the diagram. GitHub, GitLab, Notion, Obsidian and many documentation tools render it.
Which diagram types are supported?
Everything Mermaid 12 supports, including flowcharts, sequence, class, state, entity relationship, user journey, Gantt, pie, mindmap, timeline, git graph and quadrant charts.
SVG or PNG?
SVG is small, stays sharp at any size and works in web pages and design tools. PNG suits slides, chat and documents; the scale setting renders it at 1x, 2x or 3x resolution.
Why do I get a syntax error?
Mermaid could not parse the code. The message shows the line where parsing stopped; common causes are a missing arrow, unbalanced brackets or a diagram type keyword that is misspelled.
Are links and scripts in diagrams run?
No. Diagrams render with Mermaid's strict security level, so click handlers and scripts are disabled and labels are sanitized. The renderer cannot load anything from the network.
How large can a diagram be?
Up to 20,000 characters of Mermaid code. Very large diagrams may be refused as PNG at high scale; use SVG or a lower scale.