At a glance
| Mermaid | Graphviz | |
|---|---|---|
| Focus | Many diagram types for docs | General graph layout |
| Runs in browser | Yes, natively | Via WebAssembly ports |
| Markdown platform support | Wide | Rare |
| Layout control for huge graphs | Good for small/medium | Excellent, many engines |
| Sequence, Gantt, charts | Yes | No |
Same graph, two syntaxes
mermaid
flowchart LR
A --> B
A --> C
B --> D
C --> Dtext
digraph G {
rankdir=LR;
A -> B; A -> C;
B -> D; C -> D;
}Pick Graphviz for very large generated graphs (dependency graphs, call graphs). Pick Mermaid for human-written documentation diagrams that need to render on GitHub and in docs tools.
Frequently asked questions
Can Mermaid render DOT files?
No, Mermaid has its own syntax. You can ask MermaidViewer's AI to convert simple DOT graphs into Mermaid flowcharts.