Dev tools

Base45 encode

Base45 encode. Runs on your device, nothing is uploaded.

Runs on your device. The file is never uploaded.

Base45 encode packs each pair of bytes into three characters from a 45-symbol set, the one EU digital health certificates use. Those symbols are what a QR code can carry in its alphanumeric mode, so the payload fits a smaller grid. A lone final byte becomes two characters, and nothing here draws the QR symbol.

Input

Questions

What is Base45 used for?

QR codes. Base45 is the encoding defined in RFC 9285 and used by the EU digital health certificate payloads. Its alphabet matches the characters a QR code can hold in its compact alphanumeric mode, so a Base45 payload fits into a smaller, more reliably scanned symbol than the same data written in Base64.

Which characters can appear in the output?

Forty-five of them: the digits 0 to 9, the uppercase letters A to Z, then space, dollar, percent, asterisk, plus, minus, period, slash and colon. There is no lowercase and no padding character. If your output contains spaces, that is normal; space is one of the 45 symbols.

How does the length work out?

Two bytes become three characters. The encoder walks the input in pairs, treats each pair as a number up to 65535 and writes it as three base-45 digits, least significant first. If the input has an odd length the final lone byte becomes two characters instead of three. So a 10-byte file gives 15 characters.

Why not use Base64 for my QR code?

You can, but a QR code has to fall back to byte mode for lowercase letters and for plus and slash, which stores fewer characters in the same symbol. Base45 was designed so the encoded text stays inside the alphanumeric set. This tool only produces the text; generate the QR image separately.

Does Base45 secure the payload?

No. It is a transport encoding, fully reversible by anyone who scans the code, and no key is involved. The health certificate payloads that use it are protected by a separate signature over the data, not by the Base45 layer. Treat anything you encode here as public once the QR code exists.

Is my file sent to a server?

No. It is read in this tab and encoded in a Web Worker. There is no upload, no account and no history, and the page still works with your network switched off. Drop several files and each is encoded on its own, so a batch of payloads is handled without any of them leaving the device.

Related Dev tools