> Markdown copy of https://devshot.co/reviews/best-diagram-as-code-tools (the HTML page is the original; both carry the same facts).
>
> Published: 2026-09-25 · Updated: 2026-09-25
>
> Live software prices and comparisons for AI agents: Toolradar MCP server at https://toolradar.com/api/mcp (setup: https://toolradar.com/for-agents).

# Best Diagram as Code Tools in 2026

Expert Guide

Ten diagram-as-code tools compared on what a paid tier actually adds, since most of the category ships free, with prices checked on vendor pricing pages in September 2026.

**[Louis Corneloup](https://devshot.co/authors/louis-corneloup)** Founder of Dupple · 33,000+ Devshot subscribers · Updated Sep 2026

**Product links may be affiliate links.** [How we rate](https://devshot.co/how-we-rate) **10** tools compared

TL;DR

The best diagram-as-code tool for most developers in 2026 is **Mermaid**. It's free, MIT-licensed, and rendered natively by GitHub, GitLab and Notion, with the hosted **Mermaid Chart** Plus tier starting at $10/user/mo billed annually. **PlantUML**, **Graphviz** and **D2** are also fully free and open source, with no paid tier at all.

Pick **Diagrams (mingrammer)** to generate cloud architecture diagrams straight from Python, and **Excalidraw** or **draw.io** when a teammate needs to hand-edit the result. **Eraser** ($15/member/mo Starter) and **Ilograph** ($18/mo Pro) are the paid SaaS options, built for AI-assisted or multi-perspective architecture diagrams. **Structurizr**'s hosted cloud service is being shut down with no replacement, so its only paid path now is a self-hosted server priced in GBP.

**Key facts**

10 tools compared: Mermaid, draw.io (diagrams.net), Excalidraw, PlantUML, Graphviz, D2…

- **Updated:** September 25, 2026
- **Top pick:** Mermaid (best for: Teams that want a diagram GitHub, GitLab and Notion already render with no extension)
- **Top pick price as of September 25, 2026:** Mermaid: Free, MIT license (Mermaid.js); Mermaid Chart Plus $10/user/mo, Premium $20/user/mo, both billed annually.

- 10 tools compared: Mermaid, draw.io (diagrams.net), Excalidraw, PlantUML, Graphviz, D2, Diagrams (mingrammer), Eraser, Structurizr, Ilograph
- draw.io (diagrams.net) (best for: Teams that want a real diagram editor with zero license cost and zero vendor lock-in): Free plan · Confluence/Jira Cloud $1.70/mo per user · custom-priced plans too
- Excalidraw (best for: Teams that want a hand-drawn look for architecture sketches, not a polished formal diagram): Free plan · Excalidraw+ Yearly $6/mo on the annual plan · Excalidraw+ Monthly $7/mo
- PlantUML (best for: Teams that need dense UML: class, sequence, state and component diagrams from a compact text syntax): Free, LGPL-3.0 license; no paid tier or hosted product.

A diagram as code tool turns a text file, or in one case a Python script, into a rendered diagram. The diagram then lives in version control next to the system it describes, updating in the same pull request. That is the whole pitch against a drag-and-drop canvas: no drift between the doc and the architecture, and a diff you can actually review.

**Toolradar data:** the [directory homepage](https://toolradar.com/) lists 10,797+ tools across 401+ categories, checked 25 September 2026. Its closest tracked category, [best diagramming tools](https://toolradar.com/best/diagramming), evaluated 53 diagramming tools to build that ranking, checked September 2026. That list leans toward whiteboard tools like Miro and Lucidchart rather than code-first ones, so open [Mermaid](https://toolradar.com/tools/mermaid), [draw.io](https://toolradar.com/tools/drawio), [Excalidraw](https://toolradar.com/tools/excalidraw) and [Eraser](https://toolradar.com/tools/eraser-io) there for the wider catalog listing.

How we ranked: ten tools, each read on its own site or GitHub repository on 25 September 2026. The order follows license and cost, whether a CI pipeline can render the output without a browser, and what a paid tier buys once the free path runs out.

A whiteboard-first tool like Miro or Lucidchart is a different buy than a text file your CI renders on every push. That comparison lives in the [diagram tools guide](https://toolradar.com/guides/best-diagram-tools) on Toolradar.

## Top Picks

Based on features, real-world fit, and value for money.

#1 Top pick

Mermaid

The default because the syntax renders natively in the tools developers already use, with a paid hosted editor as an optional upgrade.

Pricing

Free, MIT license (Mermaid.js); Mermaid Chart Plus $10/user/mo, Premium $20/user/mo, both billed annually.

Best for

Teams that want a diagram GitHub, GitLab and Notion already render with no extension

[Visit Mermaid](https://mermaid.js.org/) Details

#2

draw.io (diagrams.net)

The only tool here with no paid tier of any kind, by design, plus native Confluence, Jira, GitHub and VS Code integrations.

Pricing

Free plan · Confluence/Jira Cloud $1.70/mo per user · custom-priced plans too[Checked Oct 8, 2026 on Toolradar](https://toolradar.com/tools/drawio/pricing)

Best for

Teams that want a real diagram editor with zero license cost and zero vendor lock-in

[Visit draw.io (diagrams.net)](https://www.drawio.com/) Details

#3

Excalidraw

A free, open-source whiteboard with a cheap $6/mo Plus tier for cloud sync and unlimited scenes.

Pricing

Free plan · Excalidraw+ Yearly $6/mo on the annual plan · Excalidraw+ Monthly $7/mo[Checked Oct 6, 2026 on Toolradar](https://toolradar.com/tools/excalidraw/pricing)

Best for

Teams that want a hand-drawn look for architecture sketches, not a polished formal diagram

[Visit Excalidraw](https://excalidraw.com/) Details

*Best Diagram as Code Tools in 2026: 10 tools compared, updated Sep 2026*

| Tool | Pricing | Best for |
| --- | --- | --- |
| Mermaid | Free, MIT license (Mermaid.js); Mermaid Chart Plus $10/user/mo, Premium $20/user/mo, both billed annually. | Teams that want a diagram GitHub, GitLab and Notion already render with no extension |
| draw.io (diagrams.net) | Free plan · Confluence/Jira Cloud $1.70/mo per user · custom-priced plans too | Teams that want a real diagram editor with zero license cost and zero vendor lock-in |
| Excalidraw | Free plan · Excalidraw+ Yearly $6/mo on the annual plan · Excalidraw+ Monthly $7/mo | Teams that want a hand-drawn look for architecture sketches, not a polished formal diagram |
| PlantUML | Free, LGPL-3.0 license; no paid tier or hosted product. | Teams that need dense UML: class, sequence, state and component diagrams from a compact text syntax |
| Graphviz | Free, Eclipse Public License 2.0; no paid tier or hosted product. | Teams that need the underlying graph-layout engine other diagram tools build on top of |
| D2 | Free, MPL-2.0 license; Terrastruct lists no paid tier for D2 today. | Teams that want a modern syntax with built-in themes, sketch mode and animated diagrams |
| Diagrams (mingrammer) | Free, MIT license; a Python library, no paid tier or hosted product. | Teams that want cloud architecture diagrams generated from a Python script, not drawn by hand |
| Eraser | Free plan · Business Plus $42/mo per member · Business $60/mo per member · custom-priced plans too | Teams that want AI-generated diagrams alongside Markdown docs in one collaborative workspace |
| Structurizr | Cloud service end of life, no replacement; self-hosted server from £300/mo, 1-20 users, billed annually; no USD price. | Teams already committed to the C4 model who can self-host, not new teams starting today |
| Ilograph | Free ($0/mo, 14-day diagram history); Pro from $18/mo (annual) or $22/mo (monthly); Team from $25/editor/mo (annual). | Teams that need one architecture model to generate several interactive, zoomable perspectives |

Pricing read from each vendor's own pricing page, checked Sep 2026. 2 of 10 publish prices for some plans and quote the rest.

Lowest published monthly price by tool

Bar chart of the lowest monthly price each vendor publishes; the same figures are in the comparison table above.

*Lowest monthly figure each vendor publishes, checked Sep 2026. A tilde marks a figure the vendor states approximately. Per-seat and usage charges can sit on top of it. 1 of 10 does not publish a comparable monthly price and is left out rather than estimated.*

### 1. [Mermaid](https://mermaid.js.org/)

Top Pick

The default because the syntax renders natively in the tools developers already use, with a paid hosted editor as an optional upgrade.

**Pricing** Free, MIT license (Mermaid.js); Mermaid Chart Plus $10/user/mo, Premium $20/user/mo, both billed annually.

**Best for:** Teams that want a diagram GitHub, GitLab and Notion already render with no extension

Pros

- MIT-licensed core library with 90,000+ GitHub stars, free forever with no rendering limit
- Native rendering in GitHub markdown, GitLab and Notion, so most diagrams need no separate viewer
- Mermaid Chart's Plus tier removes the free plan's 3-diagram cap and adds AI generation credits

Cons

- The free Mermaid Chart plan caps at 3 diagrams and limited diagram size, a real wall for anyone using the hosted editor daily
- Complex sequence or class diagrams get unreadable fast; PlantUML handles denser UML better

[Visit Mermaid](https://mermaid.js.org/)

### 2. [draw.io (diagrams.net)](https://www.drawio.com/)

The only tool here with no paid tier of any kind, by design, plus native Confluence, Jira, GitHub and VS Code integrations.

**Pricing** Free plan · Confluence/Jira Cloud $1.70/mo per user · custom-priced plans too[Checked Oct 8, 2026 on Toolradar](https://toolradar.com/tools/drawio/pricing)

**Best for:** Teams that want a real diagram editor with zero license cost and zero vendor lock-in

Pros

- Apache 2.0 licensed, with the vendor stating outright there is no Enterprise tier gating SSO
- Diagrams saved in 2005 still load today, so files never go stale against an old app version
- Confluence, Jira, Google Workspace, Microsoft 365 and VS Code integrations ship free, not gated

Cons

- Not diagram-as-code in the strict sense: the source is an XML file edited on a canvas, not a text language you'd write by hand
- No built-in CI rendering step; scripting a headless export takes extra tooling

[Visit draw.io (diagrams.net)](https://www.drawio.com/)

### 3. [Excalidraw](https://excalidraw.com/)

A free, open-source whiteboard with a cheap $6/mo Plus tier for cloud sync and unlimited scenes.

**Pricing** Free plan · Excalidraw+ Yearly $6/mo on the annual plan · Excalidraw+ Monthly $7/mo[Checked Oct 6, 2026 on Toolradar](https://toolradar.com/tools/excalidraw/pricing)

**Best for:** Teams that want a hand-drawn look for architecture sketches, not a polished formal diagram

Pros

- MIT-licensed with 132,000+ GitHub stars, and the free tier already includes unlimited collaborators
- Mermaid-to-Excalidraw import turns a text diagram into an editable sketch, bridging the two workflows
- Plus is the cheapest paid tier of any tool on this list, well under Mermaid Chart's or Eraser's entry price

Cons

- The free tier caps at 1 infinite scene; Plus is required for unlimited scenes and folders
- Hand-drawn style reads as informal for a customer-facing architecture doc

[Visit Excalidraw](https://excalidraw.com/)

### 4. [PlantUML](https://plantuml.com/)

The deepest UML support of any tool here, free under LGPL-3.0, with no commercial version to compare against.

**Pricing** Free, LGPL-3.0 license; no paid tier or hosted product.

**Best for:** Teams that need dense UML: class, sequence, state and component diagrams from a compact text syntax

Pros

- Free and open source (LGPL-3.0), with 13,000+ GitHub stars and two decades of UML syntax coverage
- Renders sequence, class, state, component, and deployment diagrams, more UML diagram types than Mermaid covers
- Runs locally via a JAR file or Docker image, so CI rendering needs no network call to a hosted server

Cons

- Syntax is denser and less forgiving than Mermaid's for a newcomer's first flowchart
- No native rendering in GitHub or GitLab; needs a plugin, proxy server, or pre-rendered image

[Visit PlantUML](https://plantuml.com/)

### 5. [Graphviz](https://graphviz.org/)

The free layout engine that PlantUML, Diagrams and dozens of other tools call under the hood, usable directly via the DOT language.

**Pricing** Free, Eclipse Public License 2.0; no paid tier or hosted product.

**Best for:** Teams that need the underlying graph-layout engine other diagram tools build on top of

Pros

- Free under the Eclipse Public License 2.0, with no commercial edition to weigh against it
- The DOT language it introduced is the layout engine several tools on this list (PlantUML, Diagrams) render through
- Handles large, densely connected graphs that hierarchical tools like Mermaid struggle to lay out cleanly

Cons

- DOT syntax is lower-level than Mermaid or D2; positioning and styling take more trial and error
- No native theming system; visual polish requires manual attribute tuning

[Visit Graphviz](https://graphviz.org/)

### 6. [D2](https://d2lang.com/)

A newer text-to-diagram language with production-ready themes and animation, free under MPL-2.0 with no commercial tier live today.

**Pricing** Free, MPL-2.0 license; Terrastruct lists no paid tier for D2 today.

**Best for:** Teams that want a modern syntax with built-in themes, sketch mode and animated diagrams

Pros

- Free under the Mozilla Public License 2.0, with 25,000+ GitHub stars on the d2lang/d2 repository
- Ships professionally designed themes and a sketch mode out of the box, ahead of Mermaid or PlantUML's default styling
- Exports to SVG, PNG, PDF, PPTX, GIF and even ASCII, and offers three interchangeable layout engines

Cons

- Terrastruct's own pricing page now redirects straight to the D2 project site, so there is no separate paid product to compare
- Smaller ecosystem and fewer native integrations than Mermaid, which GitHub and GitLab render without a plugin

[Visit D2](https://d2lang.com/)

### 7. [Diagrams (mingrammer)](https://diagrams.mingrammer.com/)

A Python library that turns infrastructure code into an AWS, Azure or GCP diagram, free under MIT with 42,000+ GitHub stars.

**Pricing** Free, MIT license; a Python library, no paid tier or hosted product.

**Best for:** Teams that want cloud architecture diagrams generated from a Python script, not drawn by hand

Pros

- MIT licensed with built-in icon sets for AWS, Azure, GCP, Kubernetes and on-prem systems, no manual icon hunting
- Diagrams live as Python functions, so the same code review and version control process covers infrastructure and its diagram
- 42,000+ GitHub stars and active maintenance make it the most established Python option for this specific job

Cons

- Only outputs static PNG images; no interactive viewer or hosted sharing link
- Requires Graphviz installed as a system dependency, an extra setup step compared to a single binary

[Visit Diagrams (mingrammer)](https://diagrams.mingrammer.com/)

### 8. [Eraser](https://www.eraser.io/)

A paid SaaS that pairs diagram-as-code with AI generation and team docs once the 3-file free cap runs out.

**Pricing** Free plan · Business Plus $42/mo per member · Business $60/mo per member · custom-priced plans too[Checked Nov 28, 2026 on Toolradar](https://toolradar.com/tools/eraser-io/pricing)

**Best for:** Teams that want AI-generated diagrams alongside Markdown docs in one collaborative workspace

Pros

- Diagram-as-code syntax plus AI generation in one workspace, with GitHub, Notion, Confluence and VS Code integrations even on Free
- Starter opens up unlimited files and 40 AI diagrams a month once the free cap gets tight
- Business adds SAML SSO and unlimited version history at $45/member/mo annually, cheaper than most competing team wikis

Cons

- The free plan caps at 3 files total, not 3 diagrams a month, so it stops being usable fast for a real project
- AI diagram count is a hard quota (40 on Starter, 250 on Business) rather than unlimited until Enterprise

[Visit Eraser](https://www.eraser.io/)

### 9. [Structurizr](https://structurizr.com/)

The C4-model pioneer, but its hosted cloud service is being shut down with no replacement, leaving a GBP-priced self-hosted server as the only paid path.

**Pricing** Cloud service end of life, no replacement; self-hosted server from £300/mo, 1-20 users, billed annually; no USD price.

**Best for:** Teams already committed to the C4 model who can self-host, not new teams starting today

Pros

- Defined the C4 model (context, container, component, code) that several other tools on this list, including Ilograph, support exporting to
- One DSL source generates multiple views (context, container, deployment) instead of separate files per diagram
- Structurizr Lite and the new 'local' command line workflow remain free for a single developer working offline

Cons

- The Structurizr cloud service is end of life with no replacement, confirmed on the vendor's own documentation in September 2026
- The only current paid product, Structurizr server, is priced in GBP (from £300/mo for 1-20 users, billed annually) with no USD list price published

[Visit Structurizr](https://structurizr.com/)

### 10. [Ilograph](https://www.ilograph.com/)

An interactive, multi-perspective architecture tool, free to start, with Pro from about $18 to $22 a month depending on billing.

**Pricing** Free ($0/mo, 14-day diagram history); Pro from $18/mo (annual) or $22/mo (monthly); Team from $25/editor/mo (annual).

**Best for:** Teams that need one architecture model to generate several interactive, zoomable perspectives

Pros

- One model generates multiple interactive, clickable perspectives, closer to a live system map than a static image
- The free plan has no diagram-count cap, only a 14-day history window, generous for solo use
- Ilograph Desktop ($11.99 to $14.99/mo depending on billing) offers an offline, on-premises option for teams behind a firewall

Cons

- Team pricing runs per editor per month ($25 to $30), which adds up faster than Eraser's or Mermaid Chart's per-user rate at small team sizes
- SSO is locked behind the custom-quote Team+ tier, not available at any published price

[Visit Ilograph](https://www.ilograph.com/)

## What it is

Diagram as code means the diagram's source is plain text (or, for Diagrams, Python) that a renderer turns into an SVG, PNG or PDF. The source is diffable, reviewable in a pull request, and reproducible on any machine that has the renderer installed, unlike a file saved inside a proprietary canvas app.

The category splits into two camps. **General-purpose text-to-diagram languages** (Mermaid, PlantUML, D2, Graphviz) draw flowcharts, sequence diagrams and graphs from a compact syntax. **Architecture-specific tools** (Structurizr, Ilograph, Diagrams) model a system's structure, usually against the C4 model or a cloud provider's icon set, and generate several views from one source. **Excalidraw** and **draw.io** sit at the edge of the category: both are canvas editors first, with a code-like layer (Mermaid-to-Excalidraw import, an XML/JSON file format) bolted on rather than built in.

## Why it matters

Every tool on this list except three is free with no paid tier at all. **PlantUML** (LGPL-3.0), **Graphviz** (Eclipse Public License 2.0), **D2** (MPL-2.0) and **Diagrams** (MIT) publish no commercial product at all. The real decision is which syntax your team will actually keep writing, not which invoice is smaller. **Mermaid**'s core library is MIT-licensed and free; its maker sells the hosted **Mermaid Chart** on top once the free plan's 3-diagram cap gets in the way.

**Devshot data:** 33,000+ developer readers get this brief, and the audience file updated November 29, 2026 puts the open rate at 32%. For that audience, the tool that renders in CI without a browser usually beats one that only works inside a hosted editor. Mermaid, PlantUML, Graphviz, D2 and Diagrams all do this, via a CLI. **Structurizr** is the cautionary case here. Its cloud service is end of life with no replacement, confirmed on the vendor's own docs in November 2026, so a team that built workflows around it now needs to migrate to the self-hosted server product or a local export.

Latency and lock-in are the other axis. A CLI tool you run in a GitHub Action never depends on a vendor's uptime. A hosted SaaS like Eraser or Ilograph trades that independence for AI generation, team libraries and a shareable link. The [CI/CD tools guide](https://devshot.co/reviews/best-ci-cd-tools) and the [Git clients guide](https://devshot.co/reviews/best-git-clients) cover the pipelines these diagrams usually render inside.

## Key features to look for

License and cost Essential

Seven of the ten tools here are fully free and open source with no paid tier. The three that sell a hosted product (Mermaid Chart, Eraser, Ilograph) charge for AI generation, team collaboration or version history, not the base rendering.

Renders in CI without a browser Essential

Mermaid, PlantUML, Graphviz, D2 and Diagrams all ship a CLI or library that renders a diagram in a GitHub Action or a build step. Excalidraw, draw.io, Eraser and Ilograph are built around an interactive editor first.

What the diagram models Essential

General-purpose languages (Mermaid, PlantUML, D2, Graphviz) draw flowcharts and sequence diagrams. Structurizr and Ilograph model whole software architectures against the C4 model. Diagrams generates cloud infrastructure diagrams from Python, with built-in AWS, Azure and GCP icon sets.

Native rendering support

GitHub, GitLab and Notion all render Mermaid blocks natively, with no extension required. PlantUML, D2 and Graphviz need a renderer, an extension, or a build step to appear inline.

AI diagram generation

Eraser's paid tiers add AI-generated diagrams (3 free, 40 on Starter, 250 on Business) from a text prompt. Mermaid Chart's Plus and Premium tiers scale AI credits the same way. The free, code-only tools have no built-in AI generation step.

## Pricing

Seven of these ten tools are **fully free with no paid tier at all**. PlantUML (LGPL-3.0), Graphviz (Eclipse Public License 2.0), D2 (MPL-2.0), Diagrams (MIT), draw.io (Apache 2.0), and the core Mermaid and Excalidraw libraries (both MIT) all ship under a permissive license with no commercial edition to buy. The decision for those seven is syntax and rendering fit, not price.

**Mermaid Chart**, the hosted product built on top of free Mermaid, is the cheaper of the two per-seat SaaS plans built on an open-source base. A higher Premium tier exists for teams that need more AI credits. **Excalidraw+** undercuts it further, the cheapest paid tier on the page, with a 14% discount for annual billing.

**Eraser** and **Ilograph** are the two dedicated paid SaaS products. Both scale from a mid-teens monthly seat price on their entry paid tier toward a team plan in the twenties to forties per seat; the pricing table below has the exact figures and billing terms. **Structurizr** is the outlier. Its cloud service is end of life with no replacement, and the surviving Structurizr server product publishes prices only in GBP, from £300/mo for 1-20 users billed annually, with no USD figure on its pricing page as of September 2026.

| Plan | Price | Best for |
| --- | --- | --- |
| **Mermaid (core library)** | Free | MIT license, no diagram or usage limit |
| **Mermaid Chart Basic** | Free | 3 diagrams, limited size, limited AI credits |
| **Mermaid Chart Plus** | $10/user/mo billed annually | Unlimited diagrams, 300 AI credits a year |
| **Mermaid Chart Premium** | $20/user/mo billed annually | 2,000 AI credits a year, unlimited viewer seats |
| **Mermaid Chart Enterprise** | Custom quote | SSO, custom contract, dedicated CSM |
| **draw.io (diagrams.net)** | Free | Apache 2.0, no paid tier of any kind |
| **Excalidraw (core app)** | Free | MIT license, 1 infinite scene, unlimited collaborators |
| **Excalidraw+ Plus** | $6/mo per user | Billed monthly; annual billing saves 14% |
| **PlantUML** | Free | LGPL-3.0, no paid tier or hosted product |
| **Graphviz** | Free | Eclipse Public License 2.0, no paid tier |
| **D2** | Free | MPL-2.0; Terrastruct's pricing page redirects to the D2 project site |
| **Diagrams (mingrammer)** | Free | MIT license, Python library, no paid tier |
| **Eraser Free** | $0/member/mo | 3 files, 3 AI diagrams, 7-day version history |
| **Eraser Starter** | $15/member/mo annual ($20 monthly) | Unlimited files, 40 AI diagrams, 90-day history |
| **Eraser Business** | $45/member/mo annual ($60 monthly) | 250 AI diagrams, SAML SSO, unlimited history |
| **Eraser Enterprise** | Custom quote | Unlimited AI diagrams, flexible deployment |
| **Structurizr server, 1-20 users** | £300/mo billed annually | No USD list price published; self-hosted, cloud service is end of life |
| **Structurizr server, 1,001+ users** | £2,400/mo billed annually | Top published server tier; contact for 251+ team pricing above 1,000 |
| **Ilograph Free** | $0/mo | Unlimited diagrams, 14-day history |
| **Ilograph Pro** | $18/mo annual ($22/mo monthly) | Custom icons, unlimited history, 20 private viewers |
| **Ilograph Team** | $25/editor/mo annual ($30/editor/mo monthly) | Team workspace, unlimited viewers |
| **Ilograph Team+** | Custom quote | SSO via SAML 2.0, API access |
| **Ilograph Desktop** | $11.99/mo annual ($14.99/mo monthly) | Offline desktop app, works with local files |

Mistakes to avoid

× Adopting Structurizr's cloud service for a new project in 2026. It is end of life with no replacement, per the vendor's own documentation, so a new team should start on Structurizr's local workflow or the self-hosted server instead.

× Assuming a diagram-as-code tool renders in CI just because it renders in a browser. Eraser and Ilograph are built around a hosted editor; Mermaid, PlantUML, Graphviz, D2 and Diagrams all ship a CLI or library that renders headless.

× Comparing Mermaid Chart's or Eraser's monthly SaaS price against PlantUML's or Graphviz's $0 as if they compete on the same axis. Seven tools on this list are free forever; the paid three sell AI generation and team collaboration on top of a category that is mostly free by default.

Expert tips

→ Start with Mermaid for anything that needs to render inline in a GitHub README or a Notion doc, since neither PlantUML nor D2 renders natively there without an extension.

→ If the team already writes infrastructure in Python, generate the architecture diagram with Diagrams (mingrammer) directly from that code instead of hand-drawing it in a separate tool that will drift out of sync.

→ Before paying for Eraser's or Ilograph's AI generation, check whether ChatGPT or Claude can already output valid Mermaid or D2 syntax for the same prompt. Both text-to-diagram languages are common enough in LLM training data that a free chat tool often gets close on the first try.

## The bottom line

Default to **Mermaid** for most day-to-day diagrams: it is free, MIT-licensed, and the only tool here GitHub, GitLab and Notion render natively. Reach for **PlantUML** when a diagram needs deep UML support, and **Graphviz** or **D2** when the layout itself, not the notation, is the hard part.

Use **Diagrams** when the source of truth is already Python, and **Excalidraw** or **draw.io** when a non-technical teammate needs to hand-edit the result. Pay for **Eraser** or **Ilograph** only once a team genuinely needs AI generation or multi-perspective modeling; check **Structurizr**'s end-of-life notice before building anything new on its cloud service. Cite this: Devshot, "Best Diagram as Code Tools in 2026", September 2026.

## Frequently asked questions

### What is the best diagram-as-code tool in 2026?

Mermaid is the default for most developers: free, MIT-licensed, and rendered natively by GitHub, GitLab and Notion with no plugin, checked on mermaid.js.org and mermaid.ai in September 2026. PlantUML is the strongest pick for dense UML diagrams, and Diagrams (mingrammer) is the best fit when the diagram should be generated from existing Python infrastructure code.

### Is Mermaid free?

Yes. The core Mermaid.js library is MIT-licensed and free with no usage limit, checked on GitHub in September 2026. The hosted Mermaid Chart product has a free Basic plan capped at 3 diagrams, with Plus starting at $10/user/mo billed annually and a pricier Premium tier above it for larger teams and more AI credits.

### Is there a free diagram-as-code tool?

Most of the category is free: Mermaid, PlantUML, Graphviz, D2, Diagrams, Excalidraw and draw.io all publish a permissive open-source license (MIT, LGPL-3.0, Eclipse Public License 2.0, or MPL-2.0) with no usage cap on the base tool. Only Mermaid Chart, Eraser and Ilograph sell a separate paid tier on top of a free plan.

### Mermaid vs PlantUML: which should I use?

Mermaid for anything that needs to render inline in GitHub, GitLab or Notion without a plugin, and for simpler flowcharts, sequence and Gantt diagrams. PlantUML for denser UML work, class and component diagrams especially, where its two-decade head start on syntax coverage shows. Both are free and open source, so the choice is about syntax and where the diagram needs to display, not cost.

### What happened to Structurizr's cloud service?

Structurizr's hosted cloud service, along with Structurizr Lite, the Structurizr CLI, and the old on-premises installer, are end of life with no replacement for the cloud service specifically, confirmed on the vendor's own documentation in September 2026. The surviving paid product is Structurizr server, a self-hosted option priced in GBP, from £300/mo for 1-20 users billed annually, with no USD price published.

### Can I generate a diagram from Python or another programming language?

Diagrams (mingrammer) generates AWS, Azure, GCP and on-prem architecture diagrams directly from a Python script, and is free under the MIT license. D2 and Graphviz both offer language APIs and CLI tools that other programs can call. Mermaid and PlantUML are primarily text languages rather than libraries, though wrapper packages exist in most languages to generate their syntax programmatically.

### What is the cheapest paid diagram tool here?

Excalidraw+ Plus, at $6/mo per user (billed monthly, with a 14% discount for annual billing), is the cheapest paid tier on this list, checked on plus.excalidraw.com in September 2026. Ilograph's Desktop plan is close behind at $11.99 to $14.99/mo depending on billing term. Both sit well under Eraser's or Mermaid Chart's entry-level seat price.

Related guides

[Git Clients](https://devshot.co/reviews/best-git-clients) [Ci Cd Tools](https://devshot.co/reviews/best-ci-cd-tools) [Terraform Iac Tools](https://devshot.co/reviews/best-terraform-iac-tools) [AI Coding Statistics 2026](https://devshot.co/statistics/ai-coding-statistics)

Some offers on this page may be paid placements or contain affiliate links.
