D2 vs Kroki vs PlantUML

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…

D2

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.

Kroki

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.

PlantUML

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.

At a Glance

 D2KrokiPlantUML
Primary categoryCollaborationCollaborationDeveloper Tools
Pricing modelFree / Open SourceFree / Open SourceOpen Source
Starting priceFreeFreeFree
Free planYesYesYes
PlatformsMac, WindowsWebNot listed
Public APIYesYesYes

Standout Differences

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-by-Feature

Licensing and Deployment

FeatureD2KrokiPlantUML
Open-source, self-hostable coreAvailableAvailableAvailable
Free public hosted instanceNot listedAvailableAvailable

Diagram Language Coverage

FeatureD2KrokiPlantUML
Own dedicated diagram-description languageAvailableUnavailableAvailable
Single API rendering multiple diagram syntaxesUnavailableAvailableUnavailable
Broad native UML diagram types (sequence, class, use case, state)LimitedAvailableAvailable

Layout, Styling and Integration

FeatureD2KrokiPlantUML
Selectable auto-layout enginesAvailableNot listedLimited
Built-in visual themes, including dark modeAvailableNot listedNot listed
Editor and documentation-tool integrationsAvailableAvailableAvailable

Pricing Compared

Starting price reflects the lowest paid tier, not the full cost for every team size or usage level.

D2

D2 (Open Source) — Free N/A

Kroki

Free (Public API or Self-Hosted) — $0 N/A

PlantUML

PlantUML — Free N/A

Use Cases

Choose D2: Teams that want modern, git-friendly software architecture and infrastructure diagrams with automatic layout and minimal manual positioning.
Choose Kroki: Teams that need one self-hosted API endpoint to render many different diagram syntaxes, including PlantUML and Mermaid, without installing and maintaining separate renderers.
Choose PlantUML: Teams standardized on classic UML documentation who want the broadest native diagram-type coverage and the largest ecosystem of editor and CI integrations.

Frequently Asked Questions

Can Kroki render diagrams written in D2 syntax?

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.

Is PlantUML one of the diagram types Kroki supports?

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.

Which of these three is the simplest to self-host?

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.

Do any of these tools have a paid tier?

Based on the Gappsy listing, 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.

Which tool requires the least setup to try immediately without installing anything?

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.

Which tool has the broadest native UML diagram support?

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.

More collaboration software comparisons

All collaboration software comparisons · All collaboration tools

Read the full D2 review · Read the full Kroki review · Read the full PlantUML review