Custom Kroki Encoder Decoder

I’ve been using Kroki for a while now to generate diagrams for documentation. Kroki allows you to code a diagram in formats like PlantUML and provides a custom URL for this diagram. This URL returns images that you can include in your documents.

I find this tool extremely useful, especially the concept of having a single source of truth for diagrams. As a software developer, I prefer coding diagrams over manually creating them. The most significant advantage for me is the reusability, as I can reverse-engineer the URL back to the original code. However, this process isn’t as straightforward as I’d like it to be.

To solve this, I decided to create a custom decoder for Kroki. With this, I can simply paste a Kroki URL and retrieve the original code. I hope this tool will make it easier for me and others to reuse diagrams.

You can access the decoder here.

The source code is available on my GitHub repository.