Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

★ 91,110⑂ 9,496👁 636⑃ 4,290● 3,966▤ 229
TypeScriptMITCreated 2014-11-01mermaid.ai/open-source/
Download: @mermaid-js/[email protected]@mermaid-js/[email protected] ↓2.1.02026-11-13
+10
Daily
+62
Weekly
91,110
stars
9,496
forks
636
watchers
4,290
prs
3,966
issues
229
releases

README

Mermaid


Generate diagrams from Markdown-like text.


  



Live Editor!


 📖 Documentation | 🚀 Getting Started | 🌐 CDN | 🙌 Join Us


简体中文


Try Live Editor previews of future releases: Develop | Next


















:trophy: Mermaid was nominated and won the JS Open Source Awards (2019) in the category "The most exciting use of technology"!!!

Thanks to all involved, people committing pull requests, people answering questions! 🙏



 Table of content


Expand contents

- About
- Examples
- Release
- Related projects
- Contributors
- Security and safe diagrams
- Reporting vulnerabilities
- Appreciation



 About

   --

Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.

 Doc-Rot is a Catch-22 that Mermaid helps to solve.

Diagramming and documentation costs precious developer time and gets outdated quickly.
But not having diagrams or docs ruins productivity and hurts organizational learning.
Mermaid addresses this problem by enabling users to create easily modifiable diagrams. It can also be made part of production scripts (and other pieces of code).


Mermaid allows even non-programmers to easily create detailed diagrams through the Mermaid Live Editor.
For video tutorials, visit our Tutorials page.
Use Mermaid with your favorite applications, check out the list of Integrations and Usages of Mermaid.

You can also use Mermaid within GitHub as well many of your other favorite applications—check out the list of Integrations and Usages of Mermaid.

For a more detailed introduction to Mermaid and some of its more basic uses, look to the Beginner's Guide, Usage and Tutorials.

Our PR Visual Regression Testing is powered by Argos with their generous Open Source plan. It makes the process of reviewing PRs with visual changes a breeze.



In our release process we rely heavily on visual regression tests using applitools. Applitools is a great service which has been easy to use and integrate with our tests.





 --

 Features

- 20+ Diagram Types – Flowchart, Sequence, Class, State, ER, Gantt, Pie, Git Graph, Mindmap, Timeline, Sankey, and more
- Markdown-Inspired Syntax – Write diagrams as text, no drag-and-drop required
- No Design Tool Needed – Generate professional diagrams straight from code
- Live Editor – Prototype instantly at mermaid.live
- Version-Control Friendly – Diagrams live as text, so diffs and reviews just work
- Native GitHub Rendering – Mermaid code blocks render directly in Markdown on GitHub
- Highly Customizable – Themes, colors, fonts, and layout directions
- Security First – Built-in sanitization plus a sandboxed rendering mode
- Lightweight – Small footprint, no heavy dependencies
- Active Community – Frequent releases and thousands of contributors
- Open Source – MIT licensed

 Examples

The following are some examples of the diagrams, cha

Top issues

Discussions

Latest release

@mermaid-js/[email protected] @mermaid-js/[email protected] 2026-11-13
Minor Changes

-   8779 eb56a54 Thanks @sidharthv96! - feat: add swimlane diagram examples, so editors such as the Live Editor list the diagram

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON