Navigate:
Mermaid
~$MERMA0.3%

Mermaid: Markdown-like text to diagram generation

JavaScript library rendering text-based diagrams as SVG.

LIVE RANKINGS • 01:56 PM • STEADY
OVERALL
#129
19
DEVELOPER TOOLS
#23
1
30 DAY RANKING TREND
ovr#129
·Devel#23
STARS
86.3K
FORKS
8.7K
7D STARS
+267
7D FORKS
+41
See Repo:
Share:

Learn more about Mermaid

Mermaid is a JavaScript library that parses markdown-inspired text syntax and renders it as SVG diagrams in the browser. It uses a text-based domain-specific language to define diagram structure, which is then processed by a renderer to produce visual output. The tool supports multiple diagram types including flowcharts, sequence diagrams, class diagrams, state diagrams, and mind maps. It integrates with documentation platforms, GitHub, and can be embedded in web applications or used via a live editor.

Mermaid

1

Text-Based Diagram Definition

Diagrams are defined using markdown-inspired syntax instead of graphical editors, enabling version control through Git and direct embedding in documentation. Changes are tracked as code diffs, making collaboration and review workflows identical to source code.

2

Multi-Diagram Single Library

Supports flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, and mind maps without switching tools. Single dependency handles all diagram types with consistent syntax patterns.

3

Native Platform Integration

Renders directly in GitHub markdown, GitLab, and major documentation platforms without preprocessing. Available via CDN, npm package, or standalone live editor for immediate use in any web environment.


import mermaid from 'mermaid';

mermaid.initialize({ startOnLoad: true });

const diagram = `flowchart TD
  A[Start] --> B{Is Valid?}
  B -->|Yes| C[Process]
  B -->|No| D[Error]`;

await mermaid.render('diagramId', diagram);

v@mermaid-js/layout-tidy-tree@0.2.1

Fix for downstream import issues by inlining non-layered-tidy-tree-layout dependency.

  • fix: Inline non-layered-tidy-tree-layout to avoid downstream import issues
vmermaid@11.12.2

Critical fix for Gantt diagram crashes caused by invalid dates and tick intervals.

  • fix: validate dates and tick interval to prevent UI freeze/crash in gantt diagramtype
vv10.9.5

Security backport updating dagre-d3-es dependency and DOMPurify to address CVE vulnerabilities.

  • This release backports the update of the dependency dagre-d3-es to 7.0.13 for CVE-2025-57347 from v11.12.1
  • We've also updated the v10.x branch to support newer versions of DOMPurify, cherry-picked from avoiding CVE-2025-26791

See how people are using Mermaid

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers