D2

Declarative diagrams.

Visit website ↗

Profile updated

Console’s review

· Reviewed by David Mytton

What we like

Full language designed for diagramming. Includes themes and animations. Use custom fonts and icons. Supports embedding code with syntax highlighting and Markdown for adding explanations. Has web editor and VS Code extension. CLI to generate the diagram output.

Tradeoffs

Can currently only export to PDF, SVG, PNG - more formats are on the roadmap.

Is D2 a fit?

Based on Console’s review published on 2025-09-04. Summary updated .

Who it’s for

Developers who need to create diagrams with code embedding and syntax highlighting should consider D2

Why consider it

D2 allows developers to create diagrams with embedded code and syntax highlighting

Keep in mind

D2 currently has limited export format options

Console is a free weekly newsletter with short reviews of developer tools, covering strengths and tradeoffs. This review reflects Console’s assessment at publication on 2025-09-04. Features and limitations may have changed since the review date. Read our selection criteria and learn about Console.

Discover your next favorite tool

Independent devtool reviews and the latest betas, in your inbox every Thursday. Free.