Repolode
yuzutech

yuzutech/kroki

Unified HTTP API that renders text-based diagram sources such as PlantUML, Mermaid, D2 and GraphViz into SVG, PNG and other images.

Stars
4,374
Forks
323
Open issues
142
Last commit
yesterday

What is it?

Kroki is a gateway that turns text-based diagram descriptions into images through a single HTTP API. Instead of installing a separate renderer for each tool, you send a diagram source to one endpoint and specify the diagram type, such as PlantUML, Mermaid, Graphviz, Ditaa, Excalidraw or Vega-Lite, along with the desired output format.

The server is written in Java on Vert.x and runs as a Docker image. Requests can be sent as URL-encoded GET calls, JSON POST bodies, or plain text with Accept headers. Some renderers, including Mermaid, BPMN, Excalidraw and diagrams.net, run as companion containers that the main server connects to through environment variables.

The project covers a wide set of diagram families, including UML, C4, ERD, DBML, BPMN, sequence and network diagrams, timing and packet diagrams, and bytefield layouts. Users can embed the generated images in documentation or web pages without installing each diagram tool locally.

Key features

  • 01Single unified API for many diagram languages
  • 02Accepts GET requests with encoded source, JSON POST, or plain text input
  • 03Outputs SVG, PNG and other image formats
  • 04Runs as a Docker image with optional companion containers for Mermaid, BPMN and Excalidraw
  • 05Configurable connections to companion services via environment variables

Use cases

  • Rendering architecture or sequence diagrams inside documentation pipelines
  • Generating diagram images for wikis or chat tools from text sources
  • Hosting a private diagram rendering service for an internal team
  • Embedding diagram previews in web applications without local tool installs

Quick start

  1. 1

    Run the Kroki container with Docker

    docker run -d -p 8000:8000 yuzutech/kroki
  2. 2

    Optionally, start companion containers for Mermaid, BPMN, Excalidraw or diagrams.net using docker-compose

    docker-compose up -d

Things to know

  • Some diagram types, such as Mermaid, BPMN and Excalidraw, require extra companion containers to be started.
  • The diagrams.net integration is experimental.

Topics

FAQ

What is kroki?
Unified HTTP API that renders text-based diagram sources such as PlantUML, Mermaid, D2 and GraphViz into SVG, PNG and other images. Kroki is a gateway that turns text-based diagram descriptions into images through a single HTTP API. Instead of installing a separate renderer for each tool, you send a diagram source to one endpoint and specify the diagram type, such as PlantUML, Mermaid, Graphviz, Ditaa, Excalidraw or Vega-Lite, along with the desired output format.
Is kroki free to use? What license does it have?
kroki is open source under the MIT license. Check the license terms before using it in commercial products.
Is kroki still maintained?
Actively maintained. The last commit to kroki was on Oct 20, 2026.
What can I use kroki for?
Rendering architecture or sequence diagrams inside documentation pipelines Generating diagram images for wikis or chat tools from text sources Hosting a private diagram rendering service for an internal team Embedding diagram previews in web applications without local tool installs
How do I install kroki?
Run the Kroki container with Docker: docker run -d -p 8000:8000 yuzutech/kroki Optionally, start companion containers for Mermaid, BPMN, Excalidraw or diagrams.net using docker-compose: docker-compose up -d
Where can I get kroki?
The source code and installation instructions are on GitHub: https://github.com/yuzutech/kroki

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects