Public APIs
Kroki favicon

Kroki

Development

Creates diagrams from textual descriptions.

Kroki's website screenshot

About Kroki

Kroki provides a unified HTTP API for generating diagrams from textual descriptions, aggregating over 25 diagram libraries including BlockDiag, BPMN, Bytefield, SeqDiag, PlantUML, D2, Mermaid, GraphViz, Excalidraw, Vega, Vega-Lite, TikZ, and WaveDrom under a single interface. Diagrams are created by encoding source text (via deflate + base64) into a GET request URL, or by submitting plain text or JSON through a POST request; the API returns output in formats such as SVG, PNG, PDF, or JPEG depending on the diagram type.

The tool is aimed at developers who want to generate diagrams programmatically without installing and maintaining the individual runtime dependencies for each diagramming library, which are written across languages including Haskell, Python, JavaScript, Go, PHP, and Java. Documentation includes code examples for encoding diagrams in Node.js, JavaScript, Java, Python, and Go, along with a generated cheat sheet listing every diagram type, its supported formats, and URL slug.

Kroki is open source under the MIT license, with code available on GitHub. It is offered as a free hosted service, run on infrastructure donated by Exoscale and built and maintained by Yuzu tech, and is also available as a self-managed instance for installation on user-controlled infrastructure, which the documentation notes requires Linux experience.

Key features

  • Unified HTTP API to render diagrams from 25+ libraries including PlantUML, Mermaid, GraphViz, D2, and Excalidraw
  • Supports GET requests with deflate+base64-encoded diagrams and POST requests with plain text or JSON body
  • Outputs multiple formats such as PNG, SVG, PDF, and base64 depending on diagram type
  • Available as a free hosted service or self-managed on your own infrastructure
  • Open source under the MIT license with code available on GitHub

Frequently asked questions

Is Kroki free to use?

Yes, Kroki is offered as a free hosted service, and it can also be self-managed on your own infrastructure at no licensing cost since it is MIT licensed.

What diagram libraries does Kroki support?

Kroki supports over 25 libraries including PlantUML, Mermaid, GraphViz, D2, DBML, Excalidraw, TikZ, Vega, Vega-Lite, and WaveDrom, among others.

How do I send a diagram to the Kroki API?

You can send a GET request with the diagram encoded via deflate and base64 in the URL, or a POST request with the diagram as plain text or JSON in the request body.

Can I self-host Kroki?

Yes, Kroki Self-Managed can be downloaded and installed on your own infrastructure or cloud environment, though it requires Linux experience.

Who is Kroki intended for?

Kroki is intended for developers who want a single unified API to generate diagrams from text descriptions instead of installing and learning many separate diagramming tools.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product