Tools that turn plain-text descriptions into diagrams, so diagrams live in version control next to the code and documentation they describe. Mermaid renders flowcharts, sequence diagrams and more from Markdown-like text and is supported in GitHub Markdown; WaveDrom draws digital timing diagrams.

By GitHub stars, the most popular diagram-as-code tools here are Mermaid (90.5K stars), Diagrams (42.7K stars), and D2 (25.6K stars). 10 of 11 had commits in the last 90 days.

Diagrams as code, ranked by GitHub stars
1 Mermaid

Generate diagrams and flowcharts from markdown-like text definitions, with a live editor.

90.5K 2,472 MIT
2 Diagrams

Diagram as code in Python for prototyping cloud system architectures.

42.7K 48 MIT
3 D2

Declarative diagram scripting language that turns text into diagrams.

25.6K 324 MPL-2.0
4 PlantUML

Generates UML, Gantt, mind map and other diagrams from plain text.

13.4K 846 LGPL-3.0
5 Markmap

Builds interactive mind maps from Markdown.

13.1K 4 MIT
6 flowchart.js

Draws SVG flowcharts from a textual description.

8.7K 1 MIT
7 Penrose

Creates diagrams from mathematical notation in plain text, from Carnegie Mellon University.

8K 48 MIT
8 LikeC4

Architecture-as-code language and tools that generate live, interactive diagrams.

5.8K 1,831 MIT
9 Kroki

Unified API that renders diagrams from many text formats, including PlantUML, Mermaid, Graphviz and D2.

4.4K 204 MIT
10 WaveDrom

Draws timing diagrams and waveforms from simple textual descriptions.

3.5K 12 MIT
11 PGFPlots

TeX package for drawing 2D and 3D plots directly in LaTeX documents.

257 13 –

Head-to-head comparisons

Related topics

Related categories

Frequently asked questions

What is the most popular diagram-as-code tool?

By GitHub stars, Mermaid is the most popular, with 90.5K stars, followed by Diagrams (42.7K) and D2 (25.6K).

Which diagram-as-code tools are actively maintained?

11 of the 11 tools listed had commits in the last 12 months, including Mermaid, Diagrams, D2, PlantUML, and Markmap. Each tool page shows monthly commit activity.

Are these diagram-as-code tools free and open source?

10 of the 11 tools listed use an OSI-approved open-source license; the others are source-available, free to use, or use a custom license, so check each tool page. The most common license here is MIT.

Missing a tool? Add it with a one-line pull request to the README.