Key differences

  • Diagrams has 1.7× as many GitHub stars as D2 (42.8K vs 25.9K).
  • D2 had more development activity over the last 12 months: 328 commits vs 46.
  • D2 is licensed under MPL-2.0; Diagrams under MIT.
  • D2 is written primarily in Go, Diagrams in Python.
  • Diagrams is the older project: its repository was created in 2020, D2's in 2022.

By the numbers

  • D2
  • Diagrams
GitHub stars
25.9K 42.8K
Commits, last 12 months
328 46
Contributors
66 177
Forks
779 2.7K
Show data as a table
D2 vs Diagrams by the numbers
MetricD2Diagrams
GitHub stars25,85942,818
Commits, last 12 months32846
Contributors66177
Forks7792,730

Development activity

Commits per month to each default branch, last 12 complete months.

  • D2
  • Diagrams
0100200 Nov 2025 Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep Oct
0100200 Nov 2025 Feb 2026 May Aug
Show data as a table
D2 vs Diagrams: commits per month
MonthD2Diagrams
Nov 202506
Dec 202501
Jan 202601
Feb 202602
Mar 202601
Apr 202622
May 202602
Jun 202606
Jul 202603
Aug 202616013
Sep 20261585
Oct 202684

Side by side

AttributeD2Diagrams
DescriptionDeclarative diagram scripting language that turns text into diagrams.Diagram as code in Python for prototyping cloud system architectures.
CategoryDiagrams as codeDiagrams as code
LicenseMPL-2.0MIT
LanguageGoPython
StatusActiveActive
Latest releasev0.9.0 ()v0.25.1 ()
Last commit
Repository created
Open issues486317
Install
go get github.com/d2lang/d2
pip install diagrams

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.

  • D2

    Declarative diagram scripting language that turns text into diagrams.

    25.9K starsGoMPL-2.0

  • Diagrams

    Diagram as code in Python for prototyping cloud system architectures.

    42.8K starsPythonMIT

More comparisons