Deflate + Base64 URL codec
Diagram services put your whole source inside the URL: compress it with deflate, encode the bytes with a base64 variant, append it to a path. This tool goes both ways — paste a PlantUML or Kroki link and read the diagram source back out, or paste source and get a shareable URL. Presets set the compression and alphabet for you.
How to use
- Pick a Preset if you recognise the service — it sets compression, alphabet and URL prefix in one move.
- To read a diagram you were sent: set Direction to Payload / URL → source and paste the whole link. Everything after the last slash is treated as the payload, so you do not have to trim it yourself.
- To share a diagram: set Direction to Source → compressed payload and paste your source. The Full URL box is ready to send.
- If decoding fails, try the other Compression setting. PlantUML's own server uses headerless
deflate-raw; Kroki uses zlibdeflate. - Copy either the bare payload or the full URL.
Why two alphabets
Kroki and most modern services use standard base64url — the RFC 4648 alphabet with - and _ in place of + and /, so the payload survives being in a URL path. PlantUML's own server predates that convention and uses its own ordering: digits first, then uppercase, then lowercase, then - and _. The two produce completely different-looking strings from the same bytes, which is why a PlantUML link pasted into a Kroki decoder returns garbage rather than an error. If a payload will not decode, switching the alphabet is the second thing to try after switching the compression format.
Compression and decompression use the browser's built-in CompressionStream and DecompressionStream, so no library is downloaded and your diagram source never leaves the tab.
FAQ
Which browsers support this?
Chrome and Edge 80+, Firefox 113+, and Safari 16.4+. On anything older the tool reports that the browser has no CompressionStream rather than failing silently.
Can it render the diagram?
No — rendering needs the diagram server. This tool handles the encoding half so you can inspect or edit the source, then paste the URL into your browser to see the picture.
Why is my payload longer than the source?
Base64 adds about a third to the byte count, so for a very short diagram the compressed-and-encoded form can exceed the original. Compression wins from roughly a hundred characters upward, which is every real diagram.
Does it handle the ~1 hex-encoded PlantUML form?
Not directly. PlantUML also accepts a ~h-prefixed plain hex payload; if you have one of those, strip the prefix and use the byte inspector to read the hex. The deflate form covered here is what the PlantUML editor and every share link produce.