Mermaid: Markdown-like text to diagram generation
JavaScript library rendering text-based diagrams as SVG.
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.
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.
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.
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);Security patch backporting dagre-d3-es 7.0.13 (CVE-2025-57347) and DOMPurify updates (CVE-2025-26791) to the v10.x branch.
- –Update dagre-d3-es to 7.0.13 to mitigate CVE-2025-57347.
- –Update DOMPurify to avoid CVE-2025-26791; no breaking changes specified.
Patches security vulnerability GHSA-cc8p-78qf-8p7q by upgrading dagre-d3-es to 7.0.13.
- –Upgrade to resolve a security issue in the dagre-d3-es dependency (CVE details not specified in notes).
- –No breaking changes or migration steps are documented for this patch release.
Patches a security vulnerability by upgrading the dagre-d3-es dependency to 7.0.13.
- –Upgrade dagre-d3-es to 7.0.13 to resolve GHSA-cc8p-78qf-8p7q security advisory.
- –Release notes do not specify the nature or severity of the patched vulnerability.
See how people are using mermaid
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
plotly.py
Interactive browser-based charts from Python with declarative API.
Keiyoushi Extensions
Community-driven issue tracking and extension management system for the Keiyoushi multi-source content aggregation platform and its extension ecosystem.
ohmyzsh
Community-driven zsh configuration framework with modular plugins.
nvm
nvm is a per-user, per-shell version manager for Node.js that allows switching between multiple installed Node versions from the command line. It works on any POSIX-compliant shell across Unix, macOS, and Windows WSL environments.
open-directory
Command-line search engine for indexed open directories.