Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
mermaid

mermaid

> 编程语言
Free

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

91.3K stars0 likes1 views
WebsiteGitHub

About

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

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)](https://osawards.com/javascript/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, charts and graphs that can be made using Mermaid. Click here to jump into the text syntax.

Flowchart [docs - live editor]

flowchart LR

A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
mermaid
flowchart LR

A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]

Sequence diagram [docs - live editor]

sequenceDiagram
Alice->>John: Hello John, how are you?
loop HealthCheck
    John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
mermaid
sequenceDiagram
Alice->>John: Hello John, how are you?
loop HealthCheck
    John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!

Gantt chart [docs - live editor]

gantt
    section Section
    Completed :done,    des1, 2014-01-06,2014-01-08
    Active        :active,  des2, 2014-01-07, 3d
    Parallel 1   :         des3, after des1, 1d
    Parallel 2   :         des4, after des1, 1d
    Parallel 3   :         des5, after des3, 1d
    Parallel 4   :         des6, after des4, 1d
mermaid
gantt
    section Section
    Completed :done,    des1, 2014-01-06,2014-01-08
    Active        :active,  des2, 2014-01-07, 3d
    Parallel 1   :         des3, after des1, 1d
    Parallel 2   :         des4, after des1, 1d
    Parallel 3   :         des5, after des3, 1d
    Parallel 4   :         des6, after des4, 1d

Class diagram [docs - live editor]

classDiagram
Class01 <|-- AveryLongClass : Cool
<<Interface>> Class01
Class09 --> C2 : Where am I?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] ele

Issues· 1824 open

View all issuesOpen on GitHub
  • #8043

    UX breadboard

    Type: EnhancementStatus: TriageType: New DiagramUpdated Sep 28, 2026
  • #2623

    BPMN support

    Type: EnhancementType: New DiagramUpdated Sep 28, 2026
  • #8160

    BPMN 2.0: bpmn-beta - PR series tracker

    Status: TriageUpdated Sep 28, 2026
  • #7699

    Add Native BPMN 2.0 Support to Mermaid.js

    Type: EnhancementContributor neededStatus: ApprovedType: New DiagramRequired GroomingUpdated Sep 28, 2026
  • #8327

    Swimlanes: Node position changes when label is added to link

    Type: Bug / ErrorStatus: TriageUpdated Sep 28, 2026
  • #8172

    ELK: `elk.cycleBreakingStrategy` is silently stripped from frontmatter/init config — missing from `defaultConfig.elk`

    Status: TriageUpdated Sep 28, 2026
  • #8298

    Preserve computed theme defaults for partial object-valued overrides

    Status: TriageUpdated Sep 28, 2026
  • #8340

    Flowchart: a label that contains a math formula is never wrapped

    Type: Bug / ErrorStatus: TriageUpdated Sep 28, 2026
  • #5543

    Background not rendered for link label with math formula

    Type: Bug / ErrorStatus: TriageUpdated Sep 28, 2026
  • #8283

    xychart: Legend text is clipped on wide charts, and chart collapses/vanishes below minimum height

    Status: ApprovedGraph: XYv12.0.1Updated Sep 28, 2026

> Tags

TypeScriptdiagramsdiagrams-as-codedocumentation

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedDec 4, 2026
Category编程语言
PricingFree

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言