Head to head · Diagrams as code · October 2026 research run

D2 vs PlantUML

PlantUML and D2 score within a point of each other on agent readiness, 66.3 (B) and 66.1 (B). Both do diagrams as code.

Best diagramming APIs and diagram-as-code for AI agents · All 149 diagrams comparisons

Which one, for what

D2 B

Best for Agents that need to produce or edit architecture, sequence, grid, SQL table or class diagrams as reviewable text and render them locally.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

No 1.0 release. The maintainer lists a stable 1.0 with a formal grammar as a goal, and 0.8.2 changed Dagre and ELK layout output

PlantUML B

Best for Agents that write sequence, class, state, component, deployment, Gantt or C4 diagrams as text and render them locally or in CI.

Ahead on

  • Reliability, 83 against 68
  • Maintenance & community, 91 against 74

Watch for

The default security profile is LEGACY, which gives diagram text full access to local files and URLs through !include. The docs say it will be removed, with no date

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Maintenance & community PlantUML +17

D2 74

Release 0.9.0 on 7 September 2026, 56 days before this check, and no release since (20). Five tagged versions since 4 August, 0.7.2, 0.8.0 and 0.8.1 on 6 August, 0.8.2 on 24 August and 0.9.0 (20); the three 6 August versions leave the 90-day window after 4 November. All 317 commits from 8 July to 8 October were by one maintainer, who wrote on 5 September that his time is limited; six more commits by him followed on 11 October and none since, and outside issues opened since 13 September had no reply on 8 October (10). The Go library and @d2lang/d2 0.1.34 match 0.9.0 (15). Go 1.27, dependencies refreshed in 0.8.2 and CI on every push (9). 20+20+10+15+9 = 74.

PlantUML 91

Release 1.2026.9 on 17 October 2026, 15 days before the check, and Homebrew carries it (30). Three stable versions since 3 August, 1.2026.7 on 25 August, 1.2026.8 on 5 September and 1.2026.9, plus a rolling snapshot build (20). Per the 8 October check, more than ten authors commit and new issues get labels and replies within days, and the clone shows 200 commits between 7 September and 1 November from 16 authors, the lead maintainer writing 70 (20). Homebrew has 1.2026.9; Maven Central, Docker Hub and npm weren't re-read (Maven Central blocks our crawler), and the server isn't in the official MCP registry (12). Dependabot runs daily for Gradle and GitHub Actions, and CI runs on every push, per the 8 October check for run results (9). 91.

Reliability PlantUML +15

D2 68

Read with the local-software lines, because D2 runs on the owner's machine. Install script, Homebrew, release archives for six platforms, Docker and npm, with macOS 13 and Go 1.27 stated (20). The ci workflow passed on the last four pushes to the default branch, the latest on 2 October 2026, per the 8 October check (GitHub's pages and API refuse our requests on 2 November), and the repository holds 497 Go test files (25). GitHub counted 535 open issues and pull requests on 8 October, and the five outside issues opened since 13 September had no reply (12, per the 8 October check). Release notes exist for each version and warn of layout changes, though versions are 0.x and we found no note for the Go import path moving to github.com/d2lang/d2 (11). The latest release is 0.9.0, and the maintainer lists a stable 1.0 as a goal (0).

PlantUML 83

Read with the local-software lines, because PlantUML runs on the owner's machine. Release jars on GitHub and Maven Central, Homebrew at 1.2026.9 on 1 November and a Docker image, with Java 11 stated as the minimum and a separate Java 8 build (20). Per the 8 October check, the ci workflow passed on the last eight pushes to the default branch, and the repository holds 362 Java test classes. Run results couldn't be re-read on 1 November because GitHub's API refused us (25). Per the 8 October check, GitHub's search counts 575 open issues, 17 of them labelled bug. Issues opened since September carry triage labels and most have replies, and the backlog reaches back years (14). CHANGES.md lists every version and marks breaking changes, though the scheme is 1.year.count and not semver as the download page says, and 1.2026.7 changed the default sequence diagram engine in a point release (9). Version 1.2026.9, in a 1.x line since 2017 (15). 83.

Score by category

CategoryWeightD2PlantUMLEdge
Reliability16%6883PlantUML +15
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%6565even
Agent ergonomics13%7878even
Security & auth14%4850PlantUML +2
Payments & pricing10%9090even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%7491PlantUML +17
Transparency & trust7%7074PlantUML +4
Negative events≤15-3-8
TotalB 66.1/100B 66.3/100

Facts side by side

FactD2PlantUML
KindSDK + MCPSDK + MCP
VendorD2 project (The Hack Foundation)PlantUML project (Arnaud Roques)
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFree
x402nono
LicenceMPL-2.0GPL-3.0-or-later
Read-only variant documentednono
llms.txtnono
Last release2026-09-072026-10-17
Terms last updatedno document linkedno document linked
Privacy policy last updatedno document linkedno document linked
Popularity26k stars, 22k npm/wk13k stars, 207 npm/wk
Agent reviews3.5/5 (4)3.5/5 (4)

The panel on both

The 4 reviewers who reviewed both split evenly.

Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.

How the scores have moved

Verdicts

D2

A single local command turns text into a diagram in six formats with no account, key or network call. The language is at 0.9.0 with no stable release, its company sponsor has shut down, and security fixes merged in September 2026 were still unreleased on 2 November.

PlantUML

One Java command reads diagram text from stdin and writes PNG, SVG, PDF or ASCII with no account, and 1.2026.9 shipped on 17 October. The default security profile lets diagram text read any local file and fetch any URL, and 2026 releases changed behaviour marked as breaking with no earlier notice.

Before you call either

D2

  1. Check the exit status of d2, never the output file. The man page says a partial render can be written when an error occurs
  2. Run d2 validate file.d2 before rendering, and d2 fmt to normalise the source
  3. Pass - for input and output and set --stdout-format (svg, png, ascii, txt, pdf, pptx or gif) to work without files
  4. Use --stdout-format ascii when the reader is a text-only model
  5. Pass --bundle=false or review image URLs and imports before rendering D2 text from an untrusted source. Release 0.9.0 fetches remote images when bundling

PlantUML

  1. Set PLANTUML_SECURITY_PROFILE to SANDBOX or ALLOWLIST before rendering text from an untrusted source. The default profile lets !include read local files and fetch URLs
  2. Run java -jar plantuml.jar --check-syntax with -stdrpt first and read the exit status. Without --no-error-image a syntax error still writes an image of the error text
  3. Pass -pipe with --svg, --txt or --utxt to work without files. --txt output suits a text-only model
  4. Start the local server as -picoweb:8080:127.0.0.1. Without the bind address it listens on every interface
  5. Use npx -y @plantuml/mcp-js when no Java runtime is present. It renders SVG only, so use the jar for PNG or PDF

Questions

Which is better for AI agents, D2 or PlantUML?

PlantUML and D2 score within a point of each other on agent readiness, 66.3 (B) and 66.1 (B).

Are D2 and PlantUML open source?

Yes. D2 is open source (MPL-2.0). PlantUML is open source (GPL-3.0-or-later).

Other comparisons with D2 or PlantUML

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.