D2
A modern DSL that turns text to diagrams.

D2 is a declarative diagramming language (DSL) that lets users create diagrams from plain text with a simple syntax. It supports features like themes, sketch mode, animations, LaTeX, code snippets, and multiple layout engines. Diagrams can be generated via a local CLI, an online playground, or a language API.
Users write diagram definitions in D2's text-based DSL syntax, which is then rendered into SVG, PNG, or PDF outputs via a CLI or online playground.
Software developers and technical writers who need to create diagrams
Background.
- Status
- launched
- Business model
- open-source
Similar projects.
Editorial take on the space this project sits in — momentum signals, adjacent moves, our call on whether the wedge is real. Get pinged when we publish a new read or when the landscape shifts.
Have a take on this space?
Tell us what you’d build differently, where you think the incumbents miss, or what we’ve gotten wrong about this project. Comments + reactions are coming soon.