Kroki provides a unified API with support for BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), C4 (with PlantUML), Ditaa, Erd, GraphViz, Mermaid, Nomnoml, PlantUML, SvgBob and UMLet... and more to come!

Ready to use
Diagrams libraries are written in a variety of languages: Haskell, Python, JavaScript, Go, PHP, Java... some also have C bindings. Trust us, you have better things to do than install all the requirements to use them. Get started in no time!
Kroki provides a unified API for all the diagram libraries. Learn once convert anywhere!
Free & Open source
All the code is available on GitHub and our goal is to provide Kroki as a free service.
Built using a modern architecture, Kroki offers great performance.
Cache with CDN coming soon
Near-instant response time if your diagram has already been generated.

Kroki provides an HTTP API to convert plain text diagrams to images. Kroki handles both GET and POST requests. When using GET requests, your diagram must be encoded in the URL using a deflate + base64 algorithm. But don't worry, if you're not familiar with deflate or base64 (or if you don't want to use them), you can also send your diagram as plain text using POST requests (see below).

Let's take an example with a GraphViz "Hello World":
digraph G { Hello->World

Here, we are using a Python one-liner to encode our diagram using deflate + base64:

cat | python -c "import sys; import base64; import zlib; print(base64.urlsafe_b64encode(zlib.compress(, 9)))"
In the documentation, we provide code examples that demonstrate how to encode a diagram in Node.js, JavaScript, Java, Python and Go.

The above command will return a value that you can copy in the URL:

GET /graphviz/svg/eNpLyUwvSizIUHBXqPZIzcnJ17ULzy_KSanlAgB1EAjQ

And here's the result:

Hello World

You can also call Kroki with POST:

{ "diagram_source": "digraph G {Hello->World}", "diagram_type": "graphviz", "output_format": "svg"

In this case, you don't need to encode your diagram.

It's also possible to send your diagram as plain text using the Content-Type header. The output format will be specified using the Accept header and the diagram source will be sent as the request body:

POST /graphviz
Accept: image/svg+xml
Content-Type: text/plain digraph G { Hello->World

You can also define the output format in the URL if you don't want to add an Accept header:

POST /graphviz/svg
Content-Type: text/plain digraph G { Hello->World

The same concept applies when sending the diagram as JSON:

POST /graphviz/svg
{ "diagram_source": "digraph G {Hello->World}"

Please note that you can interact with the API using any HTTP client.
If you want to learn more, head to our documentation. In particular, check out the "Usage" section to find out how to send requests to the Kroki API using:

Main Base main.view singleton base.component component model main.ts

Looking for inspiration? Visit the examples page.

The following diagram types and output formats are available:

The following diagram types will soon be available:

Diagram Type png svg jpeg pdf base64

You don't see your favorite diagram tool in this list, please let us know 👋

Kroki is available as a Self-Managed instance.
We are also actively looking for sponsors to provide Kroki as a free service.


Select this option if you want to download and install Kroki on your own infrastructure or in a cloud environment.

Please note that Kroki Self-Managed requires Linux experience to install.

Please refer to the documentation to install Kroki.

Free service

We are actively looking for sponsors to provide Kroki as a free service.

If you are interested, please 👋 contact us.

We also provide a server for demonstration purpose at:

Please note that the demonstration server usage is restricted to reasonable, non-commercial use-cases.
We provide no guarantee regarding uptime or latency.

Kroki is an open source project licensed under the MIT license.

If you want to know more, please 👋 contact us.