D2
Modern declarative diagramming language that turns text descriptions into professional-grade diagrams
D2 (Declarative Diagramming) is a modern, open-source diagram scripting language that transforms simple text definitions into clean, beautiful diagrams. It automatically handles complex layout positioning, routing, and styling, letting developers focus on architecture rather than manual box alignment.
Declarative Syntax & Auto-Layout
Uses an intuitive, human-readable syntax to define connections, shapes, and containers. It supports multiple layout engines like Dagre and ELK to automatically compute optimal node positioning and edge routing.
Sketched Modes & Rich Styling
Includes built-in support for hand-drawn sketches, dark mode styling, markdown text blocks, grid layouts, and sequence diagrams, making it easy to embed clear visuals into technical specs and documentation.
How it Compares
Where legacy visual editors require tedious manual dragging, dropping, and alignment, D2 treats architecture diagrams as code, enabling seamless Git version control, diff reviews, and automated generation.
Who it is for
D2 is built for software architects, technical writers, and engineering teams creating system architecture diagrams, database schemas, and documentation workflows.
Questions to Ask Yourself
Generated from community reviews to help you decide if D2 is the right fit.
No questions yet. Reviews are needed to generate decision questions.