Key differences

  • Diagrams has 1.7× as many GitHub stars as D2 (42.7K vs 25.6K).
  • D2 had more development activity over the last 12 months: 324 commits vs 48.
  • 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.6K 42.7K
Commits, last 12 months
324 48
Contributors
65 178
Forks
757 2.7K
Show data as a table
D2 vs Diagrams by the numbers
MetricD2Diagrams
GitHub stars25,56442,673
Commits, last 12 months32448
Contributors65178
Forks7572,732

Development activity

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

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

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 issues477318
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.6K starsGoMPL-2.0

  • Diagrams

    Diagram as code in Python for prototyping cloud system architectures.

    42.7K starsPythonMIT

More comparisons