Paste Mermaid. See the diagram. Instantly.

Paste Mermaid, preview instantly, export SVG/PNG, upload files, drag-to-pan, and share via URL.

Quick templates
Open a Mermaid fileDrop it anywhere — .mmd · .mermaid · .md · .txt · How to open a .mmd file
Loading Mermaid...Ln 1, Col 1
Tip: In the preview, click-and-drag (or touch-drag) to pan. Drop files onto the preview to load them.

What is Mermaid?

Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions to create and modify diagrams dynamically. It's an open-source project that allows you to generate diagrams from simple text descriptions.

Instead of using complex drawing tools, you write code-like syntax that describes your diagram, and Mermaid renders it as a visual diagram. This approach makes diagrams version-controllable, easy to update, and perfect for documentation.

Mermaid integrates seamlessly with documentation platforms, wikis, and markdown files, making it a favorite tool among developers and technical writers.

Why Use Mermaid?

  • Version Control: Diagrams are text files, so they can be tracked in Git alongside your code
  • Quick Updates: Change a few lines of text instead of redrawing entire diagrams
  • Consistency: Mermaid automatically handles layout and styling, ensuring consistent diagrams
  • No Design Tools Required: No need for Visio, Lucidchart, or other expensive tools
  • Documentation as Code: Keep diagrams in the same repository as your documentation
  • Cross-Platform: Works in browsers, Node.js, and integrates with many platforms
  • Free and Open Source: No licensing costs, active community support
  • Multiple Diagram Types: Supports flowcharts, sequence diagrams, class diagrams, and more
Advertisement

Complete Guide to Mermaid Diagrams

Learn how to create professional diagrams using simple text-based syntax

Frequently Asked Questions

Common questions about using the Mermaid Viewer and creating diagrams

Is this Mermaid editor really free?
Yes, completely free! You can create unlimited diagrams, export to SVG/PNG, share via URL, and use all features without any sign-up or payment required. The tool is supported by non-intrusive advertising.
Do I need to install anything to use this editor?
No installation needed! This is a web-based tool that runs entirely in your browser. Just visit the site and start creating diagrams immediately. Works on desktop, tablet, and mobile devices.
How do I save my diagrams?
There are several ways to save your work: 1) Export as SVG or PNG using the export buttons, 2) Share via URL - the diagram code is encoded in the URL so you can bookmark or share it, 3) Copy the text code and save it in your own text files or documentation, 4) Upload/download .mmd or .mermaid files directly.
Can I use these diagrams in my documentation?
Absolutely! Export your diagrams as SVG (scalable) or PNG images and use them in any documentation, presentations, or websites. The exported images are yours to use freely. You can also embed the Mermaid code directly in platforms that support Mermaid like GitHub, GitLab, or Notion.
What's the difference between SVG and PNG export?
SVG (Scalable Vector Graphics) files maintain quality at any size and are ideal for documentation and web use. They're also editable. PNG files are raster images good for presentations and quick sharing but lose quality when resized. Use SVG when possible for best results.
My diagram isn't rendering - what's wrong?
Check for syntax errors in your Mermaid code. Common issues include: unclosed quotes, missing colons or semicolons, incorrect node IDs, or unsupported syntax. The error message usually indicates where the problem is. Try simplifying your diagram to identify the issue.
Can I collaborate with others on diagrams?
While real-time collaboration isn't built-in, you can easily share diagrams by sending the URL (which contains your diagram code) to others. They can then view, edit, and share their version back. The text-based nature of Mermaid also makes it perfect for version control systems like Git.
Does this work offline?
The initial load requires an internet connection, but once loaded, basic editing features work offline. However, some features like exporting might require connectivity. For guaranteed offline use, consider downloading Mermaid CLI or using a local Mermaid setup.
How do I learn Mermaid syntax?
Start with our comprehensive Mermaid Guide which covers all diagram types with examples. Use the Templates panel for quick starts with common patterns. The official Mermaid documentation at mermaid.js.org is also excellent. Each diagram type landing page on this site includes detailed how-to guides and best practices.
Can I customize the appearance of my diagrams?
Yes! You can use the theme selector to choose between Default, Neutral, and Dark themes. For more advanced customization, Mermaid supports custom themes and styling through the %%{init:...}%% directive. You can define colors, fonts, and other visual properties.
What diagram types are supported?
This editor supports all major Mermaid diagram types: Flowcharts (process flows), Sequence Diagrams (interactions), Class Diagrams (OOP structure), State Diagrams (state machines), ER Diagrams (database models), Gantt Charts (timelines), Pie Charts, Git Graphs, User Journey maps, and more.
Is my diagram data private?
Your diagram code is never sent to our servers. All rendering happens client-side in your browser. When you share via URL, the code is encoded in the URL itself. We don't store, track, or have access to your diagram content.
Why should I use text-based diagrams instead of drawing tools?
Text-based diagrams offer several advantages: they're version-controllable (perfect for Git), quick to update (change a few lines instead of redrawing), consistent in style, searchable, lightweight, and can be generated programmatically. They're also easier to review in pull requests.
Can I embed Mermaid diagrams in my website?
Yes! You can include the Mermaid JavaScript library in your website and add Mermaid code blocks. Many platforms already support Mermaid natively including GitHub, GitLab, Notion, Obsidian, and various wiki systems. Check your platform's documentation for Mermaid support.
What's the maximum size diagram I can create?
While there's no hard limit, very large diagrams (>100 nodes) may render slowly depending on your device. For complex systems, we recommend breaking them into multiple smaller, focused diagrams. This also makes them easier to understand and maintain.