Mermaid
A strong pick. 2nd of 9 diagrams and node graphs.
Mermaid turns markdown-like text into flowcharts, sequence diagrams, Gantt charts and over a dozen other diagram types. It is the default choice for text-to-diagram rendering in docs, READMEs and AI chat output. It is not an interactive node editor: for drag-and-drop graphs, use React Flow or Excalidraw.
Best for: Teams that want diagrams written as text, kept in version control, and rendered in docs, markdown or LLM output.
Scores
Overall8.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
For diagrams written as text, Mermaid is the clear default. It has the widest platform support, the best LLM fluency, active funded maintenance, and the most dependents in the category. Weak layout on large graphs, frequent sanitization advisories and the v12 default changes keep it below 9. It does not compete with React Flow for interactive node editors.
- dependents: Most dependents in the category
- github commitsLastYear: Very active development
- dev.to/levi_liu/diagrams-as-code-in-2026-mermaid-plantuml-d2-excalidraw-when-to-use-what-4mo9: Ubiquity and AI output are strengths, layout is a weakness
- advisories: Recurring moderate advisories
GPT-6.2 Sol: 8.4, likely 7.3 to 9.4
Mermaid is the first choice in this category for diagrams authored as text and reviewed with code, backed by strong host support and frequent releases. React Flow fits draggable node editors better, Excalidraw fits freehand sketching, and Cytoscape.js fits graph analysis. The range reflects how much a project depends on precise layout, consistent output across upgrades, or rendering untrusted input.
- simplify-software.org/blog/mermaid-vs-plantuml: Strong coverage for text diagrams in the current release
- code.visualstudio.com/updates/v1_146: Current v12 integration in a major editor
- npm versionsLastYear and dependents: Frequent releases and the largest measured dependent-repository count
- reactflow.dev/learn/customization/custom-nodes: Interactive node editing and custom controls
- plus.excalidraw.com/docs/sdk: Embeddable open-source sketch editor
- js.cytoscape.org: Graph visualization and graph theory algorithms
- github.com/mermaid-js/mermaid/releases/tag/mermaid@12.0.0: Major upgrade changed default rendering
- github.com/mermaid-js/mermaid/security/advisories: Past issues matter for applications that render untrusted diagrams
Needed by many6.3
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Many developers write a diagram in docs or a README at some point. Fewer install a diagram library in an app. Mermaid's text-to-diagram approach serves the largest slice of this category, but not interactive node editors.
- dependents: 13,441 dependent repos, the most among the peers
- dev.to/levi_liu/diagrams-as-code-in-2026-mermaid-plantuml-d2-excalidraw-when-to-use-what-4mo9: Rendered in GitHub, Obsidian, doc sites and LLM chats
GPT-6.2 Sol: 6.6, likely 5.5 to 7.7
Flowcharts, sequence diagrams, and data models are useful across frontend, backend, and infrastructure work. Markdown support brings Mermaid to teams that may never install a diagram library. Freehand sketching and interactive editors serve other needs in this category, and the available architecture survey is too small and specialized to estimate demand across JavaScript and TypeScript developers.
- mermaid.js.org/config/usage.html: Diagram types and browser integration
- docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams: Built-in rendering in repositories and discussions
- icepanel.medium.com/state-of-software-architecture-report-2025-12178cbc5f93: 87% of 75 architecture survey respondents use diagramming tools
Helps a lot7.9
How well does it do the job for those who need it?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It is the broadest and best-supported text-to-diagram tool for JavaScript, it ships types, and LLMs write it very well. Its layouts are weak on large graphs and its default styling looks dated, which is why third-party renderers such as Pele and beautiful-mermaid exist. Version 12 brings a new look and pluggable layouts such as ELK, but D2 still produces better layouts.
- dev.to/levi_liu/diagrams-as-code-in-2026-mermaid-plantuml-d2-excalidraw-when-to-use-what-4mo9: Rates AI output Excellent, layout Fair and theming Dated
- newreleases.io/project/github/mermaid-js/mermaid/release/mermaid@12.0.0: v12 changes layout and look defaults
- hackerNews top: Popular projects re-render Mermaid as themeable SVG or ASCII, which points to gaps in the stock output
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 8.2, likely 7.1 to 9.2
Mermaid 12.3.0 offers a typed API, detailed examples, and automatic SVG layout across many diagram types. An outside comparison rendered all six examples correctly, though its first flowchart took about 450 milliseconds to load and draw, and parser diagnostics were verbose. Users report layout problems on complex graphs, including a label overlap whose fix landed after 12.3.0 shipped. A sequence diagram benchmark found that model accuracy varies, so agent-generated diagrams still benefit from a render and review.
- npm latestVersion and hasTypes: Stable 12.3.0 ships TypeScript definitions
- mermaid.js.org/config/usage.html: Rendering, parsing, and configuration examples
- simplify-software.org/blog/mermaid-vs-plantuml: Six-diagram comparison measured rendering and diagnostics
- github.com/mermaid-js/mermaid/issues/8580: Reported ELK label overlap fixed after the stable release
- news.ycombinator.com/item?id=50132193: Users report frustration with complex automatic layouts
- arxiv.org/abs/2511.14967: Sequence diagram generation accuracy varies by model
Holds up over time8.3
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
Activity is very high: 2,944 commits, 55 releases and 16 npm versions in the last year, from 866 contributors. A company, Mermaid Chart (now mermaid.ai), employs core maintainers. The large backlog of 1,379 open issues and 576 open PRs, and the visual breaking changes in v12, keep it below the top.
- github commitsLastYear: 2,944 commits and 55 releases in the last year
- github openIssues/openPullRequests: Large backlog of open issues and PRs
- buttondown.com/weekly-project-news/archive/weekly-github-report-for-mermaid-august-04-2026: Steady weekly development activity in 2026
- newreleases.io/project/github/mermaid-js/mermaid/release/mermaid@12.0.0: v12 raises runtime requirements and changes defaults
GPT-6.2 Sol: 8.1, likely 6.9 to 9.2
Mermaid published 16 npm versions in a year, and the repository shows more commit activity than any listed peer. Several contributors appear in recent release work, and a commercial product is built around the library. Some fixes land within weeks, but roughly 1,400 open issues and 576 open pull requests indicate a sizable queue. The v12 layout and runtime changes, the undecided v13 rendering roadmap, and limited public detail on release access and funding widen the range.
- github commitsLastYear, contributors, openIssues, openPullRequests and peers: 2,944 repository commits, 866 lifetime contributors, and a sizable queue
- npm versionsLastYear: 16 releases of the npm package itself
- github.com/mermaid-js/mermaid/actions/workflows/release.yml: Multiple contributors appear in recent release workflow activity
- github.com/mermaid-js/mermaid/issues/8580: A reported layout regression was fixed in 17 days
- mermaid.ai/blog/posts/mermaid-has-a-new-home-heres-what-that-means-for-the-open-source-project: The library and commercial platform share a home
- github.com/mermaid-js/mermaid/releases/tag/mermaid@12.0.0: v12 changed layout, appearance, and runtime requirements
- mermaid.js.org/intro/v13-alpha.html: Renderer rewrite is a proof of concept with an incremental path also under consideration
Used widely8.2
How many use it, and is that growing?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
Its 13,441 dependent repos are the most in the category, and downloads grew about 12.7x year over year, well above the 4.1 median. Many downloads come through doc tools and AI chat renderers that bundle it. Native rendering on GitHub and in other platforms also means far more people use it than npm shows.
- npm downloadsLast4Weeks: 104M now vs 8.2M a year ago, a ratio of about 12.7
- medianDownloadsRatio: Median ratio is 4.1
- dependents: 13,441 repos and 554 packages, ahead of Cytoscape.js at 5,456
- github stars: 91k stars
GPT-6.2 Sol: 7.4, likely 6.1 to 8.7
Four-week npm downloads rose from 8.2 million to 104.5 million, a 12.7-fold increase against the catalog median of 4.1-fold. The 13,441 indexed dependent repositories give Mermaid the largest measured footprint among peers with data, and its 37 Bluesky posts lead the supplied peer counts. Automated installs and downstream packages inflate npm volume, while hosted Markdown and CDN use can bypass npm entirely. Those effects leave the number of projects choosing the library directly uncertain.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo and medianDownloadsRatio: Download growth was roughly three times the catalog median ratio
- dependents and peers: 13,441 indexed repositories and 554 npm packages
- github stars, bluesky posts and peers: 91,184 stars and the highest Bluesky post count among listed peers
- github.com/meta/docusaurus/blob/main/packages/docusaurus-theme-mermaid/package.json: The Docusaurus Mermaid theme pulls in the package
- mermaid.js.org/config/usage.html: Documents direct CDN use
- docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams: GitHub users can author diagrams without a package install
Vouched for8.9
Who stands behind it being good?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
GitHub, GitLab, Azure DevOps, Notion, Obsidian and Docusaurus build Mermaid rendering into their products. Independent 2026 comparisons name it the most accessible diagrams-as-code tool. Many third-party editors and renderers build on its syntax.
- dev.to/levi_liu/diagrams-as-code-in-2026-mermaid-plantuml-d2-excalidraw-when-to-use-what-4mo9: Independent comparison; calls ubiquity its superpower
- dev.to/jimmyzhou/is-plantuml-outdated-in-2026-a-practical-look-at-modern-diagram-as-code-3934: 2026 comparison of diagram-as-code tools
- hackerNews top: Many 2026 projects (Ferrite, Pretty Fish, Mermaid ASCII) build on Mermaid
- GitHub/GitLab native Mermaid support: Major platforms render Mermaid blocks natively
GPT-6.2 Sol: 8.7, likely 7.6 to 9.7
GitHub and GitLab ship Mermaid rendering, VS Code recently upgraded its built-in renderer to v12, and Docusaurus maintains an integration. A recent outside comparison ran six diagram types on the current release and rendered them all successfully. Obsidian's move to Pele shows that confidence in Mermaid syntax can survive a switch away from its renderer, and the available evidence gives little insight into satisfaction across developers as a whole.
- docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams: GitHub renders Mermaid across several Markdown surfaces
- docs.gitlab.com/user/markdown/#mermaid: GitLab documents native Mermaid 12 support
- code.visualstudio.com/updates/v1_146: VS Code upgraded its built-in renderer to Mermaid 12
- docusaurus.io/docs/markdown-features/diagrams: Docusaurus ships a dedicated Mermaid integration
- simplify-software.org/blog/mermaid-vs-plantuml: Outside comparison rendered six fixtures on 12.3.0
- obsidian.md/changelog/2026-11-02-desktop-v1.15.0: Obsidian switched to a Mermaid-compatible renderer
Safe6.2
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It has 11 advisories in 24 months, mostly CSS injection, prototype pollution and DoS. Fixes shipped quickly and were backported to 10.x, but the steady flow shows a real attack surface when it renders untrusted input. The OpenSSF Scorecard is 6.7, with weak Token-Permissions, Branch-Protection and Fuzzing checks. It pulls in 22 dependencies and is MIT-licensed.
- advisories: 16 total, 11 in the last 24 months, five published August 2026
- advisories.gitlab.com/npm/mermaid/CVE-2026-41159: CSS escape via config, fixed in 10.9.6 and 11.15.0
- osv.dev/GHSA-6x64-9x62-f2gx: Sibling CSS injection, patched in 11.16.1 and 10.9.8
- scorecard: 6.7 overall; Token-Permissions 0, Branch-Protection 1, Fuzzing 0
- npm dependencies: 22 direct dependencies
GPT-6.2 Sol: 6.4, likely 5.1 to 7.7
Mermaid is MIT-licensed, and its GitHub Actions release workflow enables npm provenance. The five August advisories had fixes in 11.16.1, with selected v10 backports, and Snyk lists no known direct vulnerabilities for 12.3.0. The package still has 22 direct dependencies, and July's Scorecard flagged weak branch protection, broad workflow token permissions, and no detected fuzzing. Strict defaults and optional iframe sandboxing help, but risk varies with who supplies the diagram text and which dependencies the application resolves.
- npm license and dependencies: MIT package with 22 direct dependencies
- advisories total, last24Months and recent: 16 total advisories, 11 in 24 months
- scorecard score and checks: 6.7 overall with weak branch protection, token permissions, and fuzzing scores
- github.com/mermaid-js/mermaid/releases/tag/mermaid@11.16.1: August release shipped fixes for the reported issues
- github.com/advisories/GHSA-c4c3-pg64-4m4v: Confirms a fix on both v11 and v10
- security.snyk.io/package/npm/mermaid/12.3.0: No known direct advisories listed for the stable version
- github.com/mermaid-js/mermaid/blob/master/.github/workflows/release.yml: Automated npm publishing with provenance enabled
- mermaid.js.org/config/usage.html#securitylevel: Strict mode by default and optional iframe isolation
Good
- GitHub, GitLab, Obsidian, VS Code, Docusaurus and many chat interfaces render it natively, so one source works almost everywhere.
- AI coding agents and LLMs write correct Mermaid more reliably than any other diagram language.
- It covers many diagram types: flowchart, sequence, class, state, ER, Gantt, mindmap, architecture, XY chart, radar, treemap and more.
- Development is very active and company-backed, with frequent releases and security fixes backported to the 10.x line.
Bad
- Automatic layout gets cramped and tangled beyond about 15 nodes, and you have little fine control over placement.
- It renders untrusted text into the DOM, which has led to a steady stream of CSS-injection, prototype-pollution and DoS advisories.
- Version 12 changed the default layout, theme and look, and raised the runtime floor to Node 22.12 and Safari 17.4.
- The bundle is heavy with 22 dependencies, and it offers no interactive editing of nodes.
The numbers
- npm downloads, 4 weeks
- 104M ×13 in a year
- GitHub stars
- 91k
- Commits, 12 months
- 2.9k
- npm version
- 12.3.0 Nov 2026
- Versions, 12 months
- 16
- Advisories, 24 months
- 11 of 16 ever
- OpenSSF Scorecard
- 6.7 out of 10, Jul 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (mermaid-js/mermaid), npm (mermaid), OSV and the OpenSSF Scorecard.
Diagrams and node graphs
- 8.6React Flow
- 8.5Mermaid
- 7.6Cytoscape.js
- 7.4elkjs
- 7.4sigma.js
- 7.3Excalidraw
- 6.7dagre
- 6.7JointJS
- 6.3vis-network