Kroki turns textual diagram descriptions into images through one HTTP API. It supports many diagram languages and output formats, with optional self-hosted or hosted use.
Overview
Kroki is a diagram service that accepts text descriptions and returns rendered images. A single gateway exposes many diagram backends—such as PlantUML, Mermaid, GraphViz, Excalidraw, and numerous others—so callers do not install each toolchain separately.
Clients can send GET requests with deflate-and-base64-encoded diagram text in the URL, or POST plain text, JSON, or headers to specify diagram type and output format (for example SVG, PNG, or PDF depending on the diagram kind).
You can run Kroki as a free public endpoint or install it on your own Linux infrastructure. The core ships as a Docker image; companion containers cover Mermaid, BPMN, Excalidraw, and diagrams.net when those engines are needed.
The product is also offered through third-party hosting templates and managed deployments; the project documents docker run and docker-compose setups for multi-container stacks.
Key features
- Unified API across many diagram types
- GET and POST request styles
- Multiple output formats per engine
- Docker image for the gateway server
- Optional companion containers for select engines
- Public free service plus self-managed install
- URL-encoded or plain-text diagram input
- Modular server and worker architecture
Use cases
- Embed diagrams in documentation pipelines
- Render PlantUML or Mermaid from CI or apps
- Self-host diagram generation in a private network
- Generate architecture or ERD images from source text
- Try diagram syntax via the public HTTP endpoint