Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

D2 review

Free#29 of 44 in Diagramming Software

A strong developer-focused choice for diagrams-as-code and offline rendering.

6.3/10Editor score
D26.3 Visit D2

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

D2 is an open-source declarative diagramming language for software engineers. Users write diagrams as text files and render them through a local command-line interface, watch mode, or the D2.js browser and Node.js library. It fits teams and individuals creating software architecture diagrams, UML class diagrams, and sequence diagrams who prefer diagrams-as-code, offline editing, and repeatable source files. D2 runs on macOS, Linux, and Windows, with an online playground for browser-based creation and sharing.

Its strongest differentiator is the depth of its text-based workflow. Containers, imports, variables, and globs support structured diagram sources, while Markdown, LaTeX, tables, code snippets, images, and icons add content beyond basic shapes and labels. Interactive tooltips and links can add context to diagrams. Multiple layout engines, themes, and sketch mode provide rendering options without changing the underlying declarative approach. Integrations with Visual Studio Code and Vim fit developer editors, while the language API and D2.js extend diagram generation into browser and Node.js projects.

D2 also covers a wide range of output needs: SVG, PNG, PDF, PPTX, GIF, and ASCII exports support graphical, document, presentation, animated, and text-based use cases. That breadth makes it practical when diagrams need to move beyond a source repository. The tradeoff is focus: D2 is a local developer tool rather than a hosted collaborative editor, and its text-first model is not aimed at users who want a primarily visual, drag-and-drop experience. Choose it for open-source diagrams-as-code, local CLI workflows, and software-focused documentation; choose a different category option if real-time collaborative editing or a desktop GUI is central to the workflow.

D2 pros and cons

  • Where it wins
    • Text-based syntax supports versionable, repeatable diagram workflows
    • Local CLI, watch mode, multiple layouts, themes, and sketch mode
    • Exports to SVG, PNG, PDF, PPTX, GIF, and ASCII
  • Where it doesn't
    • Text-first authoring is less suited to drag-and-drop diagramming
    • Developer-oriented features may not fit general business users
    • Local workflows are not centered on hosted collaborative editing

D2 fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update