What it is
Mermaid is an open-source (MIT) diagramming library that renders diagrams from a Markdown-ish definition language. Instead of dragging boxes around in a GUI and exporting a PNG, you write the diagram as text, commit it, and let the renderer produce the picture. GitHub, GitLab, Notion, Obsidian, Mintlify, Confluence and most modern docs tools render Mermaid natively.
The pitch is the same as code review itself: text diffs, version history, blame, and diagrams that regenerate when the system changes — which is how they stop lying.
What it actually does
It supports flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, git graphs, user journeys, mindmaps, timelines, quadrant charts, C4 architecture diagrams and more. The JS library runs in the browser or in Node (for CI rendering to SVG/PNG), and Live Editor at mermaid.live gives you a paste-and-see sandbox.
```mermaid
flowchart TD
A[User opens PR] --> B{CI green?}
B -->|yes| C[Review requested]
B -->|no| D[Fix failing tests]
D --> B
C --> E[Approved]
E --> F[Merge to main]
```
How it compares to alternatives
vs draw.io / diagrams.net. draw.io is the GUI heavyweight: pixel control, huge shape libraries, offline desktop app. It wins for polished one-off architecture posters. Mermaid wins for diagrams that must track reality — the moment the system changes, someone updates the text in the same PR as the code.
vs PlantUML. PlantUML is older, Java-based and beloved by enterprise for sequence/UML precision. Mermaid is JavaScript-native (renders in the browser), Markdown-friendly and the one GitHub renders with zero setup. For docs-in-repo, Mermaid; for strict UML shops, PlantUML.
Pricing and free tier
Free and open source. MIT license, no tiers, no seats, no upsell. Mermaid Chart is the optional commercial companion (hosted editor and team features), but the library itself will never cost you anything.
Where it shines / where it doesn’t
Shines: diagrams in READMEs and docs, PR-reviewable architecture, sequence flows that auto-update, onboarding docs, incident postmortems, anything where the diagram is documentation rather than decoration.
Doesn’t: pixel-perfect layouts, exotic notation, wiring diagrams, high-touch brand-compliant posters, and huge graphs — once a flowchart passes a few dozen nodes, manual layout breaks down and you start fighting the auto-layout engine. Complex topology wants a real modeling tool.
Getting started in 3 minutes
Open mermaid.live, paste the flowchart above, see it instantly. Then put a fenced mermaid code block in any GitHub README or issue and watch it render. No install, no build step. For local rendering in CI:
npm install -g @mermaid-js/mermaid-cli
mmdc -i diagram.mmd -o diagram.svg
# exit code non-zero on syntax errors — perfect for CI linting docs
60-second verdict checklist
- Does the target platform render Mermaid natively (GitHub, Notion, Mintlify)? If not, ship SVG via CI.
- Are diagrams kept under 30 nodes? Split before the auto-layout fights back.
- Is the Mermaid source committed next to the code it documents?
A note on team adoption
Diagrams only stay alive if someone owns them. Assign the architecture diagram to the on-call engineer each rotation, review it at quarterly architecture reviews, and treat a stale diagram like a failing test — block the merge or fix the text. Teams that ritualize diagram review get documentation they can trust; teams that don’t get prettier lies in their READMEs within two releases.
Three mistakes teams make
First, treating diagrams as write-once decoration instead of review artifacts — if a PR changes the flow, the Mermaid block changes in the same PR. Second, cramming an entire system into one flowchart; split sequence, state and ER diagrams by concern. Third, pasting raw HTML into labels and expecting it to render — Mermaid escapes aggressively and the error messages are cryptic, so lint in CI with mmdc and keep diagrams small enough that a human can actually diff them. Used that way, Mermaid is the cheapest accuracy upgrade your docs will ever get.
PeaBox fit
Every PeaBox tool that touches architecture or data flow should carry its diagram in the repo as Mermaid. It keeps the atlas pages, the docs and the READMEs honest — change the flow, change the text, same commit. It pairs especially well with Mintlify, which renders Mermaid blocks natively, and with Linear issue descriptions for design reviews without leaving the tracker.
The honest practitioner take
Mermaid isn’t going to lay out your 60-node enterprise topology beautifully — no text tool will. What it gives you is the thing most diagrams lack: custody. A diagram in the repo gets updated, reviewed and blaming-ly maintained. A diagram in someone’s Miro board is a fossil. If your docs have architecture pictures that are six months stale, switching those diagrams to Mermaid is the cheapest documentation fix in existence.
Library details approximate as of Nov 2026; check mermaid.js.org for current syntax.