BYTETOOLS

PlantUML Server API

Free PlantUML server API with no key: render sequence, class, activity and component diagrams to SVG or PNG from an encoded URL. Tested example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the PlantUML Server API?

The public PlantUML server exposes a free, key-free rendering API. You encode PlantUML source into a URL path segment and request it under `/plantuml/svg/`, `/plantuml/png/` or `/plantuml/txt/`, and the server returns the rendered UML diagram as an image.

PlantUML has been the default text-to-UML tool for well over a decade, and the project runs a public server that renders diagrams over plain HTTP. That means a UML diagram can live in your repository as five lines of text and still appear as an image in a README, wiki or issue tracker, with nothing installed anywhere.

The one thing that trips people up is the URL encoding. PlantUML does not put your source in a query string — it deflate-compresses it and then applies a custom base64 alphabet, producing the opaque path segment you see in the example below. Every PlantUML client library ships an encoder for this; writing one by hand is possible but rarely worth it. If you want a plain-text POST interface instead, the Kroki API wraps the same renderer.

Quick facts

Base URL
https://www.plantuml.com/plantuml
Authentication
No key or account for the public server. The server is open source and commonly self-hosted, which is the recommended route for private diagrams since the source is encoded, not encrypted.
Rate limit
No published limit. The public instance is best-effort and throttles abusive traffic.
Pricing
Free. PlantUML is GPL-licensed and the server is distributed as a Docker image and a WAR file.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the PlantUML Server API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Render a sequence diagram as SVG

GET https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd91m00

curl
curl 'https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd91m00'
JavaScript (fetch)
const res = await fetch("https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd91m00");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd91m00", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" data-diagram-type="SEQUENCE" style="width:120px;height:130px;background:#FFFFFF;" width="120px" height="130px" viewBox="0 0 120 130" zoomAndPan="magnify" preserveAspectRatio="none" contentStyleType="text/css"><?plantuml 1.2026.7beta11?><defs/><g font-family="sans-serif" lengthAdjust="spacing"><g><title

Parameters

ParameterTypeRequiredDescription
formatpath segmentRequiredOutput format, given as the first path segment: `svg`, `png`, `txt` (ASCII art) or `map` (image map). svg
encodedpath segmentRequiredThe diagram source, deflate-compressed then encoded with PlantUML's custom base64 alphabet. SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd91m00
~1 prefixpath segmentOptionalPrefixing the encoded segment with `~1` switches to hex encoding, which is far easier to generate than the deflate form. ~1404040

Response fields

(body)image
The rendered diagram as raw bytes — SVG markup, PNG data or ASCII art depending on the format segment.
X-PlantUML-Diagram-Errorheader
Present when the source failed to parse. The rendered image also contains the error text drawn onto it.

What you can build with the PlantUML Server API

  • Keep sequence and class diagrams as text in Git and render them in a README
  • Add UML previews to a documentation site without a build-time dependency
  • Generate architecture diagrams inside a CI pipeline
  • Produce ASCII-art versions of diagrams for terminal output or plain-text docs

Common errors and how to fix them

400

The encoded segment could not be decoded.

Fix: Your encoder is producing standard base64 rather than PlantUML's alphabet. Use a PlantUML client library, or switch to the `~1` hex form.

200 with an error image

The source decoded but failed to parse. PlantUML draws the syntax error into the image instead of failing the request.

Fix: Check the `X-PlantUML-Diagram-Error` response header, which carries the message as text.

503

The public server is overloaded.

Fix: Retry with backoff, or self-host — the Docker image is a one-line deployment.

PlantUML Server API — frequently asked questions

Is the PlantUML server API free to use?

Yes. The public server at plantuml.com renders diagrams for free with no key or account. It is a best-effort community service, so self-host the Docker image for production or private diagrams.

How do I encode PlantUML source for the URL?

The source is deflate-compressed and then encoded with a custom base64 alphabet. Every official PlantUML client library includes this encoder. An easier alternative is the `~1` prefix, which switches the server to plain hex encoding of the raw source.

Is it safe to send private diagrams to the public PlantUML server?

No. The encoding is compression, not encryption — anyone with the URL can decode the source, and the request itself leaves your network. Run your own server for anything confidential.

What is the difference between the PlantUML server and Kroki?

Kroki wraps PlantUML alongside about 25 other diagram languages and accepts diagram source as plain text in a JSON POST body, which avoids the encoding step. The PlantUML server is the upstream renderer and supports PlantUML syntax only.

Tools that pair with this API

PlantUML Server is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.