D2, Kroki and PlantUML all let engineering teams keep diagrams as version-controlled plain text instead of drag-and-drop files, but they solve different parts…
Free / Open Source · From Free
Best for: Teams that want modern, git-friendly software architecture and infrastructure diagrams with automatic layout and minimal manual positioning.
Free / Open Source · From Free
Best for: Teams that need one self-hosted API endpoint to render many different diagram syntaxes, including PlantUML and Mermaid, without installing and maintaining separate renderers.
Open Source · From Free
Best for: Teams standardized on classic UML documentation who want the broadest native diagram-type coverage and the largest ecosystem of editor and CI integrations.
| D2 | Kroki | PlantUML | |
|---|---|---|---|
| Primary category | Collaboration | Collaboration | Collaboration |
| Rating | Not documented | Not documented | Not documented |
| Pricing model | Free / Open Source | Free / Open Source | Open Source |
| Starting price | Free | Free | Free |
| Free plan | Yes | Yes | Yes |
| Free trial | Not documented | Not documented | Not documented |
| Platforms | Mac, Windows | Web | Not documented |
| Team collaboration | Not documented | Not documented | Not documented |
| AI features | Not documented | Not documented | Not documented |
| Public API | Yes | Yes | Yes |
D2 is purpose-built for architecture diagrams, not general UML
D2's shape library leans into cylinders, queues, clouds and infrastructure icons with selectable dagre and ELK layout engines, giving polished technical diagrams with less manual tuning than classic UML tools, though it uses its own language rather than a widely pre-integrated one like Mermaid.
D2
Kroki trades its own syntax for universal coverage
Rather than defining a diagram language, Kroki exposes one HTTP API that renders over 20 existing syntaxes, including PlantUML, Mermaid, GraphViz, C4 and Excalidraw, which is valuable for teams that don't want to standardize on a single diagram language but do want a single rendering endpoint.
Kroki
PlantUML remains the deepest native UML tool, and a Kroki backend
Among native UML diagram types, PlantUML supports state, class, sequence, use case, activity, component and deployment diagrams out of the box, plus extensions like C4 and Gantt charts, and because it's also one of the syntaxes rendered by Kroki's unified API, it has reach both as a standalone tool and inside Kroki-based pipelines.
PlantUML, Kroki
All three are free with different open-source licenses
D2 is MPL-2.0, Kroki is MIT, and PlantUML is GPL - all are free to self-host with no paid tier documented for the core tool, though the license terms differ enough to matter for teams with strict open-source compliance policies.
D2, Kroki, PlantUML
| Feature | D2 | Kroki | PlantUML |
|---|---|---|---|
| Open-source, self-hostable core | Available | Available | Available |
| Free public hosted instance | Not documented | Available | Available |
| Feature | D2 | Kroki | PlantUML |
|---|---|---|---|
| Own dedicated diagram-description language | Available | Unavailable | Available |
| Single API rendering multiple diagram syntaxes | Unavailable | Available | Unavailable |
| Broad native UML diagram types (sequence, class, use case, state) | Limited | Available | Available |
| Feature | D2 | Kroki | PlantUML |
|---|---|---|---|
| Selectable auto-layout engines | Available | Not documented | Limited |
| Built-in visual themes, including dark mode | Available | Not documented | Not documented |
| Editor and documentation-tool integrations | Available | Available | Available |
Starting price reflects the lowest paid tier, not the full cost for every team size or usage level.
Pros
Cons
Pros
Cons
Pros
Cons
Based on Kroki's documented list of 20-plus supported diagram types, which includes PlantUML, Mermaid, GraphViz, C4 and others, D2 is not listed among them, so teams standardized on D2 should keep using D2's own CLI or server rendering rather than expecting Kroki to render D2 files.
Yes, PlantUML is listed among Kroki's supported diagram languages, meaning a team can send PlantUML markup to Kroki's unified API and get a rendered diagram back without running a separate PlantUML server.
D2 ships as a single Go binary with no external runtime dependencies. Kroki self-hosts via Docker or Docker Compose, though rendering the full set of 20-plus diagram types means running additional companion service containers. PlantUML runs as a Java application or server and, for some diagram types, also depends on Graphviz being installed.
Based on the provided pricing data, D2, Kroki and PlantUML are all free and open source with no paid tier for the core tool itself. Terrastruct, the company behind D2, does sell a separate commercial visual editor product, but that is distinct from the free D2 language and CLI.
Kroki is the most immediate option because of its free public instance at kroki.io, which can render diagrams via a simple HTTP request with no local installation. D2 and PlantUML both require downloading and running a local binary, server, or Docker image to render diagrams.
PlantUML goes deepest on classic UML: activity, component, state, class, sequence, use case and deployment diagrams are all natively supported, alongside extensions such as C4, Gantt charts and mind maps. D2 leans architecture-focused rather than UML-complete, and Kroki only reaches UML territory indirectly, by passing PlantUML markup through its API instead of implementing UML support of its own.
Read the full D2 review · Read the full Kroki review · Read the full PlantUML review