Alternatives

Alternatives to Mermaid, mostly about layout.

Almost everyone leaving Mermaid is leaving because of how the diagram looks, not what it can express.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

Mermaid's decisive advantage is that it renders natively in a GitHub README with no build step and no committed image, which is why it spread faster than anything else in its category. Its decisive weakness is layout: on anything past a moderate graph the result needs coaxing, and the coaxing is unportable. D2 was designed later with layout quality as an explicit goal and offers three engines. PlantUML covers far more diagram types. Graphviz is the layout engine much of the field is built on. Generated tools skip the language entirely.

If layout is the problem

D2 is the direct answer: open source, an offline CLI with a watch mode, exports to SVG, PNG and PDF, and a choice among three layout engines because layout was treated as the hard part rather than a detail. Graphviz is the older and lower-level option, and much of what other tools do is Graphviz underneath. Both cost you Mermaid's native GitHub rendering, so you commit an image.

If you need diagram types Mermaid lacks

PlantUML has the widest coverage in this category, including the full range of UML plus a well-used C4 macro library, and needs Java or a hosted server to render. If your requirement is a specific formal diagram type, PlantUML almost certainly has it and Mermaid may not.

If you want to stop writing diagrams

Every option above still has you author the diagram. Tools that read the repository do not: CodeViz in VS Code, GitDiagram for a public GitHub URL, Lucid Train as a desktop app whose agent emits a semantic graph that a constraint solver lays out, so overlaps cannot occur and the diagram can become a coding specification.

One thing to check before you move

Mermaid Chart, the commercial product built around Mermaid, now redirects to mermaid.ai and its old domain serves a robots file disallowing crawling with a note that the content has moved. If you are evaluating the hosted product rather than the open-source renderer, make sure you are looking at the current site.

Where Lucid Train sits

Lucid Train is one of the options below rather than the conclusion. It is a desktop application that generates architecture diagrams from a codebase and hands them to a coding agent, it has no browser version, no real-time collaboration and no share links, and for several of the needs on this page it is the wrong answer.

When this was checked

Facts here were checked against each vendor's own site on 22 August 2026. Pricing and features change without notice, so verify anything you are about to decide on.

By reason for leaving

You wantLook at
Better layout, same ideaD2, Graphviz
More diagram typesPlantUML
Native GitHub renderingStay on Mermaid
No authoring at allCodeViz, GitDiagram, Lucid Train
FAQ

Questions

What renders in a GitHub README besides Mermaid?

Nothing, natively. Everything else means committing an SVG or PNG, which any of these tools can produce and which also renders fine.

Is D2 a drop-in replacement?

No. It is a different language, so diagrams have to be rewritten. What you get is better layout and PDF export; what you lose is native GitHub rendering.

Why do Mermaid diagrams look cramped?

Its layout algorithm has less room to manoeuvre than Graphviz or D2's engines, and correcting it means indirect tricks that do not port anywhere else. It is the known cost of Mermaid's reach.

Related

Last updated