1001Ferramentas
🔤Converters

Base45 Encoder/Decoder

Encode and decode data in Base45, the format used in EU digital COVID certificates so they fit inside QR codes.

Base45

Why the EU certificate picked Base45

You scanned an EU digital COVID certificate, saw a wall of characters starting with HC1: and wondered what encoding that was. Or you are reading RFC 9285 and want to watch the alphabet work on your own input instead of pulling in a library. This page covers the bottom layer: type text, get the matching Base45 string, refreshed on every keystroke.

The algorithm chews through the input two bytes at a time. Each pair becomes a 16-bit value (a times 256 plus b) written as three base-45 digits, least significant first. A leftover single byte at the end emits two digits instead. The alphabet holds 45 symbols: 0-9, A-Z, space and $%*+-./: — precisely the QR alphanumeric table. Type AB and you get BB8, the test vector printed in the RFC itself.

Base45 emits more characters than Base64 does (three per two bytes versus four per three) and still yields a smaller QR, because alphanumeric mode packs each character into roughly 5.5 bits instead of 8. Two honest limits: this page only encodes, even though the tool description mentions decoding, and the output is not a valid certificate — a real DCC wraps CBOR, a COSE signature, zlib and the HC1: prefix around the payload. Everything runs in your browser.

Frequently asked questions

Can I decode Base45 here?
No. The page has one text field and returns the encoded form only. The tool description mentions decoding, but that direction was never built into the interface.
Why not just use Base64 inside a QR code?
Base64 includes lowercase letters, which fall outside the QR alphanumeric table and push the encoder into byte mode at 8 bits per character. Base45 was designed to fit that table and cost about 5.5 bits.
Can I build an EU certificate with this?
No. Base45 is only the outermost layer. Underneath sit a CBOR payload, the issuer's COSE signature and zlib compression, and none of that can be produced here.

Related Tools