D2 vs Markmap
A data-driven comparison of two Diagrams as code: popularity, development activity, licensing and installation. Updated .
Key differences
- D2 has 1.9× as many GitHub stars as Markmap (25.6K vs 13.1K).
- D2 had more development activity over the last 12 months: 324 commits vs 4.
- D2 is licensed under MPL-2.0; Markmap under MIT.
- D2 is written primarily in Go, Markmap in TypeScript.
- Markmap is the older project: its repository was created in 2020, D2's in 2022.
By the numbers
- D2
- Markmap
Show data as a table
| Metric | D2 | Markmap |
|---|---|---|
| GitHub stars | 25,564 | 13,147 |
| Commits, last 12 months | 324 | 4 |
| Contributors | 65 | 12 |
| Forks | 757 | 1,012 |
Development activity
Commits per month to each default branch, last 12 complete months.
- D2
- Markmap
Show data as a table
| Month | D2 | Markmap |
|---|---|---|
| Oct 2025 | 7 | 0 |
| Nov 2025 | 0 | 0 |
| Dec 2025 | 0 | 0 |
| Jan 2026 | 0 | 0 |
| Feb 2026 | 0 | 0 |
| Mar 2026 | 0 | 0 |
| Apr 2026 | 2 | 0 |
| May 2026 | 0 | 0 |
| Jun 2026 | 0 | 2 |
| Jul 2026 | 0 | 0 |
| Aug 2026 | 160 | 0 |
| Sep 2026 | 155 | 2 |
Side by side
| Attribute | D2 | Markmap |
|---|---|---|
| Description | Declarative diagram scripting language that turns text into diagrams. | Builds interactive mind maps from Markdown. |
| Category | Diagrams as code | Diagrams as code |
| License | MPL-2.0 | MIT |
| Language | Go | TypeScript |
| Status | Active | Active |
| Latest release | v0.9.0 () | v0.18.0 () |
| Last commit | ||
| Repository created | ||
| Open issues | 477 | 57 |
| Install | go get github.com/d2lang/d2 | npm install markmap-lib |
Which should you choose?
Popularity and activity are only part of the story. Consider which ecosystem you work in, the chart types and interactions you need, how much data you render, and whether the license fits your project. Both tool pages list alternatives if neither is quite right.