Short answer: choose it for diagrams you review in Git
Use Mermaid when developers review diagram relationships as text alongside documentation; choose a visual editor when exact placement and routing are essential. Our Mermaid source install succeeded in 96 seconds, the build in 53 seconds and tests in 440 seconds, with an installed footprint of 1,150 MB. SimpleMermaid's Mermaid and Draw.io comparison describes the practical division between automatic layout and direct visual control.
Mermaid turns text definitions into drawings: an author names elements, describes their relationships and lets a renderer arrange the result. A changed connection can therefore appear as a readable edit in a pull request. The project README describes Markdown-inspired definitions, GitHub rendering and version-control-friendly diagram source. This workflow gives reviewers something concrete to compare, but the author still owns the accuracy of the relationships written into the diagram.
Mermaid.js, the Live Editor and Mermaid Chart have different jobs
Mermaid.js is the MIT-licensed library; the Live Editor is an authoring interface; Mermaid Chart adds hosted AI diagramming, collaboration and storage. The project README identifies the open-source software, while the getting-started guide describes the browser editors and integrations. An account requirement for the hosted service belongs to that service, rather than to every use of Mermaid syntax.
The Live Editor accepts Mermaid code and exports PNG, SVG or Markdown. Its guide says editing history is stored in browser storage, edits are saved every minute and only the last 30 edits are viewable. Keeping the source in a repository gives the team a separate record of changes. The hosted first-diagram guide, by contrast, asks for a Mermaid account and discusses diagram and AI plan limits.
What people use mermaid for
Architecture sketches, class diagrams and API documentation appear in named accounts of Mermaid use. Kevin O'Shea evaluated an AWS microservices drawing, an architect described drawing classes, and gfraiteur reported documenting an API. Their accounts help distinguish a diagram type that fits a task from one that merely looks similar. Each example below links to the person describing the work and its outcome.
| Who used it | What they did | What happened |
|---|---|---|
| Kevin O'Shea | Built an AWS microservices diagram for a hypothetical blog application | He reported fixing bugs and considering layout in his architecture-diagram evaluation. |
| The architect who opened issue #1462 | Drew software class diagrams | The author used Mermaid for classes and PlantUML for component diagrams in the component-diagram request. |
| GitHub user gfraiteur | Used Mermaid in API documentation | gfraiteur reported documenting an API in issue #1462. |
| GitHub user jgreywolf | Tried network topologies as flowcharts, with and without subgraphs | The approach partly worked, but jgreywolf disliked its appearance in issue #1227. |
O'Shea compared Mermaid with Python Diagrams using a hypothetical blog architecture. He credited Mermaid's broader diagram coverage, VS Code plugins and GitHub rendering, while preferring Python Diagrams for more complex architecture examples. His account connects the choice to the work involved in finishing a drawing. It also explains why a tool that handles one architecture example well need not be the best fit for entity relationships or another notation.
Mermaid also appears as a rendering component inside other applications. In an announcement for Hermex 2.2, uzairansar said SVG and Mermaid code blocks open as pictures and diagrams in agent chat. An application can generate a block of Mermaid text and render it as a picture. The library's role in that workflow is rendering the diagram definition, while the announcement describes the surrounding chat application's behavior.
What happened when we ran it
Our November 19 hands-on safety step failed with "compose config unreadable"; the separate source harness completed installation, build and tests. The hands-on safety record contains the failure, while the run summary describes deployment through Docker Compose with every port bound to 127.0.0.1. Teardown reported "ok" in the teardown record after that attempt.
The source run used commit 7a027f7 on November 19, 2026. Its recorded configuration specified 3 CPUs, 8 GB RAM and image label lab-node:22. Our run measured the contributor checkout and its installed workspace. The checkout contained 4,546 files, approximately 242,738 source lines and 21.4 MB before installation; the installed workspace occupied 1,150 MB. These figures describe different stages of preparing the repository.
| Source-harness step | Our measured result | What you can use it to judge |
|---|---|---|
| Installation with pnpm | Succeeded in 96 seconds; 2,211 dependencies recorded | Preparation time and dependency count for this contributor checkout |
| Installed workspace | 1,150 MB on disk | Disk allowance for the installed checkout |
| Build | Succeeded in 53 seconds | Completion and duration of the recorded build step |
| Tests | Succeeded in 440 seconds | Completion and duration of the recorded test step |
The repository scan found 26 CI workflow files, a Dockerfile, a Compose file, a tests directory and monorepo workspaces. For someone contributing to Mermaid, the installed footprint is the useful planning figure. For someone writing a diagram, the usage guide describes editors and the published library, which are different entry points from preparing the entire source workspace.
Where people get stuck: layout and diagram types
Connected subgraphs and diagram-specific styling recur in Mermaid's GitHub discussions. A subgraph groups nodes under a boundary, but connections across that boundary also become part of the layout problem. In issue #2509, participants discussed replacing connections between individual elements with connections between groups. MathieuJC objected because the replacement described a different relationship, even when it improved the arrangement.
| Problem someone reported | Practical response | Resolution shown in the discussion |
|---|---|---|
| MathieuJC's connected subgraphs ignored their requested directions | Participants tried connecting groups instead of individual nodes | The discussion contains a workaround and an objection about changed meaning in issue #2509. |
| Users wanted individual sequence actors and arrows styled like flowchart nodes | Match styling examples to the diagram type | 2pl said the styling gap kept them on mscgen in issue #523. |
| An architect needed component diagrams above the class level | The author used PlantUML | The component request is marked open in issue #1462. |
| Notion and Obsidian users wanted BPMN business-process notation | Participants discussed BPMN Sketch Miner and BPMN-js rendering | The BPMN request is marked open in issue #2623. |
Diagram support also changes by version and notation. The use case documentation describes usecase-beta for Mermaid 12.0.0 and later. That gives an answer to the older request for a dedicated use case type. Component diagrams and BPMN are separate requests. Likewise, jgreywolf's network-topology experiment used flowcharts, while the swimlane discussion suggests subgraphs as a partial substitute for lanes.
The full and tiny packages make different layout choices
Mermaid v12 bundles ELK in the main package, while the tiny build uses Dagre when a diagram requests ELK. ELK and Dagre are layout engines: they arrange nodes and connections. The usage guide explains that ELK was previously an optional layout-package installation. Choosing the smaller build therefore changes the available layout machinery as well as the package's included features.
The tiny build omits mindmaps, architecture diagrams, KaTeX mathematical rendering, lazy loading and ELK. The guide describes registering the separate ELK layout package alongside tiny when that combination is needed. Start the package decision with the diagram types and rendering features the page uses. The 1,150 MB contributor-workspace measurement above describes the installed repository, whereas this package choice concerns the renderer integrated into a website.
The usage guide lists Node.js 22.12.0 or newer for the npm package. It says Mermaid v12.0.0+ bundles target ES2024 and aim to support Safari 17.4 or later. The use case guide also names the default redux-color theme, neo look and ELK layout for that diagram type. Renderer upgrades can therefore affect the picture as well as the syntax an author can write.
Security defaults disable clicks, and fonts affect labels
Mermaid's default strict security setting encodes HTML tags and disables click functionality, according to the usage guide. Loose mode allows HTML and clicks; antiscript removes script elements while allowing HTML and clicks; sandbox mode renders inside an iframe. These settings give application owners distinct integration choices. The README's security discussion explains why accepting diagram text from external users requires care.
Dynamically loaded fonts can also affect the rendered result. The usage guide's labels-out-of-bounds explanation says Mermaid should wait for the page and its assets, particularly fonts, before rendering. It also describes specifying the intended font as a workaround. When labels overflow their shapes, that loading sequence is a concrete integration detail to investigate before changing names that accurately describe the system.
Mermaid vs PlantUML, Draw.io and Python Diagrams
SimpleMermaid's comparison describes Draw.io as offering manual shape placement and connection routing. That makes it a candidate when spatial arrangement is part of the task. Mermaid instead keeps the relationship definition in text. The architect in issue #1462 supplies a different reason to consider an alternative: the author used Mermaid for classes but PlantUML for component diagrams.
| Your priority | Candidate | Reason grounded in the reported comparison |
|---|---|---|
| Review diagram relationships as text alongside code | Mermaid | SimpleMermaid describes line-level Git changes and pull-request review in its workflow comparison. |
| Place boxes and route connections yourself | Draw.io / diagrams.net | The same article describes manual placement and routing in its layout comparison. |
| Draw component diagrams beyond existing class diagrams | PlantUML | The architect used it for that job in the component-diagram request. |
| Concentrate on architecture diagrams authored in Python | Python Diagrams | O'Shea preferred its handling of complex architecture examples in his comparison with Mermaid. |
O'Shea did not choose a final winner between Mermaid and Python Diagrams. He credited Mermaid's broader coverage and GitHub rendering while describing better results from Python Diagrams on complex architecture examples. His comparison supports choosing around the notation and editing workflow of the diagrams a team maintains. An architecture example and an entity-relationship diagram ask different things of the renderer, even when both definitions live beside code.
Outdated claims, corrected
SimpleMermaid's automatic-layout claim overstates how little work an author may need to do. Its guide says Mermaid handles layout, positioning and styling automatically, while O'Shea describes layout decisions and bug fixes. The subgraph discussion adds a specific example involving connections across groups. Automatic arrangement still leaves the author responsible for whether the resulting drawing communicates the intended relationships.
The hosted syntax guide describes independent subgraph directions, while issue #2509 describes direction working only for isolated subgraphs. SimpleMermaid's shape table also mislabels double braces as a diamond and double square brackets as a database. The first-diagram guide instead identifies A{Label} as a diamond, A[[Label]] as a subroutine and A[(Label)] as a cylinder.
The Mermaid-versus-Draw.io landing page calls Draw.io's format binary XML, whereas SimpleMermaid's comparison describes XML files. The landing page also promises synchronization with code without manual steps, then recommends updating diagrams in the same commit. Keeping related edits together supports coordinated maintenance; an author still has to change the diagram definition when the represented system changes.
FAQ
The Live Editor lets a first-time author enter Mermaid code and inspect the diagram, according to the getting-started guide. The guide places code in the Code panel and the rendered result in the Preview panel. It also documents PNG, SVG and Markdown export, so an author can begin with a small definition and save the result without preparing the contributor checkout.
How do I use Mermaid to create my first diagram?
The README's flowchart example starts with flowchart LR and includes A[Hard] -->|Text| B(Round). The declaration selects a flowchart and its left-to-right direction; the next statement connects two labeled nodes. Copy the definition into the Live Editor's Code section, as described in the editor guide, then change the labels and relationships to describe a small process you need to document.
How do I control Mermaid's diagram layout?
A flowchart direction such as LR or TD chooses the drawing's overall direction. The syntax guide recommends changing direction when a diagram is difficult to read. For grouped nodes, the #2509 discussion describes connections affecting subgraph direction. Its suggested group-to-group workaround changes what the connection represents, so preserve the intended relationship when adjusting the drawing.
How do I escape parentheses and other special characters in Mermaid labels?
The syntax guide recommends quoting a label containing special characters, showing A["Label with (parentheses) and, commas"]. It also says lowercase end is reserved and recommends End or END when that word breaks a diagram. These are parser rules described in the label troubleshooting guidance, separate from choosing a layout engine or changing the visual styling.
How do I change colors in Mermaid diagrams?
For flowcharts, classDef defines styles and class or ::: applies them, as shown in the SimpleMermaid styling example. Its example assigns fill, stroke, stroke width and text color to named classes. The sequence-styling request #523 asks for similar control of actors and arrows, so select an example written for the diagram type you are editing.
Which Mermaid extension should I use in VS Code?
The README directs readers to a community integrations list, and O'Shea praises Mermaid's VS Code plugins in his architecture-diagram comparison. For an author maintaining documentation, a useful selection criterion is whether the preview accepts the syntax used by the destination host. The extension is an authoring tool; readers ultimately see the output produced by that host's Mermaid renderer.
Should I choose Mermaid or PlantUML?
The architect in issue #1462 used Mermaid for classes and PlantUML for components. That choice concerns the notation required by the drawing. Mermaid's 12.0.0+ use case documentation describes actors interacting with a system and its use cases, a different UML task. Class, component and use case diagrams therefore need separate consideration when choosing a documentation workflow.
Should I choose Mermaid or Draw.io?
SimpleMermaid's workflow and layout comparison pairs Mermaid's text and Git workflow with Draw.io's direct placement and routing. The practical question is whether reviewers need to inspect a changed relationship as text or edit the drawing's spatial arrangement directly. A diagram maintained through pull requests and a presentation whose box positions carry meaning place different demands on the editing interface.
Can Mermaid create flowcharts with swimlanes?
A participant in issue #2028 suggests subgraphs as a halfway solution for swimlanes. The request asks for lanes within a flowchart, and the reply points to grouping nodes with subgraphs. That is a specific workaround for someone organizing a flow across boundaries: the groups express divisions, while the connections still describe the relationships between the elements placed inside them.
Does Mermaid support BPMN, and is implementation planned?
The BPMN request #2623 is marked open and contains requests for business-process documentation in Notion and Obsidian. Participants discuss dedicated alternatives and distinguish authoring a process in a concise text language from rendering existing BPMN XML. Those are different workflows, so a team requiring BPMN should start with that notation and the tools discussed in the thread.
What we have not tested yet
Commit 7a027f7 has successful recorded install, build and test steps, but no recorded successful diagram-authoring task from the separate Compose attempt. The safety failure and deployment summary conflict; the error gives no cause for the unreadable configuration. The configured image label does not identify the actual runtime version. Raw toolchain logs are needed for that detail, and the measurements contain no passing-test count or confirmation that every CI workflow ran.
Browser rendering speed, large-diagram memory use, visual quality, hostile-input handling and full-versus-tiny performance remain outside our measurements. We have not reproduced the reported subgraph behavior or sequence-styling requests on this commit. The use case documentation labels its syntax beta and warns of incompatible changes. The closed Venn and swimlane requests do not identify delivered renderer support; the examples-package metadata establishes its tag and publication date, without release contents.
We have not ranked VS Code extensions, compared Excalidraw or D2, or evaluated Mermaid Chart's hosted service. The Hermex announcement is an integration claim, and O'Shea's comparison is an author's evaluation rather than our benchmark. Search suggestions establish neither demand volumes nor adoption. Rendered page layout, assets, accessibility and recommendation modules also fall outside this text correction. No corrected code example was executed for this revision.
For an adoption decision, use one diagram your team must maintain, select the destination renderer and make a real relationship change. Review the definition and resulting picture together in that host. This exercise addresses the central choice in the review: whether text-based maintenance and automatic layout suit the people who will own the drawing after its first version.


