# D2 vs Mermaid

## Key differences

- Mermaid has 3.5× as many GitHub stars as D2 (90.5K vs 25.6K).
- Mermaid had more development activity over the last 12 months: 2,472 commits vs 324.
- D2 is licensed under MPL-2.0; Mermaid under MIT.
- D2 is written primarily in Go, Mermaid in TypeScript.
- Mermaid is the older project: its repository was created in 2014, D2's in 2022.

| | D2 | Mermaid |
|---|---|---|
| Description | Declarative diagram scripting language that turns text into diagrams. | Generate diagrams and flowcharts from markdown-like text definitions, with a live editor. |
| GitHub stars | 25,564 | 90,531 |
| Commits (12 months) | 324 | 2,472 |
| Contributors | 65 | 365 |
| License | MPL-2.0 | MIT |
| Language | Go | TypeScript |
| Status | Active | Active |
| Install | `go get github.com/d2lang/d2` | `npm install mermaid` |

Source: https://awesomedataviz.com/compare/d2-vs-mermaid/ · Data updated 2026-10-04 · Content: CC BY 4.0, Awesome Dataviz (https://awesomedataviz.com).
