Mermaid is a free, open source business intelligence & reporting project written in TypeScript and released under MIT. It has 90,293 GitHub stars, 9,266 forks and 1,781 open issues, and was last pushed 2 days ago. On this registry it ranks #1 of 34 tracked projects in Business Intelligence & Reporting, with 5 head-to-head comparisons available. It gained 80 stars over the last 6 tracked days.

What is Mermaid?

What it is

Mermaid is a JavaScript-based diagramming tool that renders diagrams from Markdown-like text definitions. It lives in the JavaScript/TypeScript ecosystem and operates both in the browser and in Node.js environments. The project’s core purpose is to eliminate the gap between software development and documentation by letting developers write diagrams alongside code, avoiding the rot and overhead of manual diagram maintenance.

Key capabilities

  • Renders flowcharts, sequence diagrams, class diagrams, state diagrams, entity-relationship diagrams, user journey diagrams, and mindmaps from declarative text syntax
  • Supports embedding directly in Markdown files via fenced code blocks (e.g., ```mermaid)
  • Provides a live editor at mermaid.live for real-time preview and sharing
  • Exposes programmatic APIs for integration into build tools, static site generators, and custom applications
  • Offers configurable theming, layout options, and security settings (e.g., sanitized rendering)
  • Distributes via npm, CDN, and standalone browser bundles with small gzipped footprint (~200 KB)
  • Integrates with GitHub, GitLab, Obsidian, Typora, and VS Code extensions out of the box

Who uses it and how

Developers embed Mermaid in documentation repositories (e.g., READMEs, wikis) to keep diagrams synchronized with code changes. Technical writers use the Live Editor to prototype diagrams before committing them to Markdown-based docs. Teams running CI/CD pipelines generate architecture or flow diagrams programmatically as part of build steps. Researchers and educators create interactive diagrams in Jupyter notebooks or static sites using Mermaid’s JS library.

Getting started

Install via npm install mermaid or include via CDN (https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js). Run mermaid.parse() or use mermaid.initialize() with a config, then call mermaid.render() to generate SVG or PNG. The Live Editor at mermaid.live provides instant no-install experimentation.

When to use it — and when not to

Mermaid replaces paid tools like Lucidchart or draw.io for text-centric workflows but lacks drag-and-drop editing or advanced layout algorithms. It requires no backend but depends on client-side JavaScript rendering or Node.js build steps. Complex diagrams may need manual tuning of layout parameters, and large-scale rendering in CI may require headless browser setup (e.g., Puppeteer). It is unsuitable for real-time collaborative editing or scenarios demanding pixel-perfect layout control.

project readme (upstream, from github) — read inline

Mermaid

Generate diagrams from Markdown-like text.

Live Editor!

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

简体中文

Try Live Editor previews of future releases: Develop | Next



NPM Build CI Status npm minified gzipped bundle size Coverage Status CDN Status NPM Downloads Join our Discord! Twitter Follow Covered by Argos Visual Testing OpenSSF Scorecard

: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! 🙏

Banner for "The Official Guide to Mermaid.js" book

Table of content

Expand contents

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.

Covered by Argos Visual Testing

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.

readme truncated — read the full docs on github

Frequently asked questions

Is Mermaid free to use?

Mermaid is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Mermaid do?

Text-based diagramming that renders in code and docs

What is Mermaid written in?

Mermaid is primarily written in TypeScript. Its source is publicly available at https://github.com/mermaid-js/mermaid, and it has 90,293 GitHub stars.