D2
Declarative diagram scripting language that turns text into diagrams.
- Active
- MPL-2.0
- Go
- Diagrams as code
- GitHub stars
- 25.6K#17 in the directory
- Commits, last 12 months
- 324
- Contributors
- 65
- Last commit
- Latest release
- v0.9.0Sep 7, 2026
Overview
D2 is an open-source diagram-as-code tool released under the MPL-2.0 license. Its GitHub repository has 25,564 stars, 757 forks, and 65 contributors. It is actively developed with 324 commits in the last 12 months. The latest release, v0.9.0, was published on Sep 7, 2026.
Its GitHub description: D2 is a modern diagram scripting language that turns text to diagrams.
GitHub topics: diagrammingdiagramstext-to-diagramsoftware-architecturegogolangdeveloper-tools
Install
Development activity
Commits per month to the default branch over the last 12 complete months.
Show data as a table
| Month | Commits |
|---|---|
| Oct 2025 | 7 |
| Nov 2025 | 0 |
| Dec 2025 | 0 |
| Jan 2026 | 0 |
| Feb 2026 | 0 |
| Mar 2026 | 0 |
| Apr 2026 | 2 |
| May 2026 | 0 |
| Jun 2026 | 0 |
| Jul 2026 | 0 |
| Aug 2026 | 160 |
| Sep 2026 | 155 |
Popularity among Diagrams as code
Show data as a table
| Tool | Stars |
|---|---|
| Mermaid | 90,531 |
| Diagrams | 42,673 |
| D2 | 25,564 |
| PlantUML | 13,352 |
| Markmap | 13,147 |
| flowchart.js | 8,700 |
| Penrose | 7,985 |
Alternatives to D2
-
Mermaid
Generate diagrams and flowcharts from markdown-like text definitions, with a live editor.
-
Diagrams
Diagram as code in Python for prototyping cloud system architectures.
-
PlantUML
Generates UML, Gantt, mind map and other diagrams from plain text.
-
Markmap
Builds interactive mind maps from Markdown.
-
flowchart.js
Draws SVG flowcharts from a textual description.
-
Penrose
Creates diagrams from mathematical notation in plain text, from Carnegie Mellon University.
More comparisons: D2 vs Mermaid · D2 vs Diagrams · D2 vs PlantUML · D2 vs Markmap
D2 FAQ
Is D2 open source?
Is D2 still maintained?
How do I install D2?
go get github.com/d2lang/d2.What are the best alternatives to D2?
What language is D2 written in?
Data: GitHub API, Go. Updated Oct 4, 2026.