# D2

Declarative diagrams.

Source: [Console review](<https://console.dev/tools/d2>)

Website: [https://d2lang.com/](<https://d2lang.com/>)

Profile updated: 2026-10-16

Category: [Frontend frameworks](<https://console.dev/tools/categories/developer-tools-frontend-framework>)

## Supported tech stack

Research checked: 2026-10-11

### Runs on

- Linux (Operating system)
- Windows (Operating system)
- macOS (Operating system)

Source: [Research source](<https://d2lang.com/>)

Documented compatibility; coverage may be incomplete. Written in describes implementation, not user-project language support.

Official page explicitly lists macOS, Linux and Windows support.

## Console’s review — 2025-09-04

Reviewed: 2025-09-04

Author: [David Mytton](<https://console.dev/about#david-mytton>)

Citation: [This review](<https://console.dev/tools/d2#review_718eb961d402eeddd4b3a042a3e86e23674e0217274c1003399a48504a766bba>)

### 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.

This review reflects Console’s assessment at publication on 2025-09-04. Features and limitations may have changed since the review date.

## Is D2 a fit?

Based on [Console’s review published on 2025-09-04](<https://console.dev/tools/d2#review_718eb961d402eeddd4b3a042a3e86e23674e0217274c1003399a48504a766bba>).

Summary updated: 2026-10-16

### 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

[Selection criteria](<https://console.dev/selection-criteria>) · [About Console](<https://console.dev/about>) · [Browse tools](<https://console.dev/tools>)
