Base45 converter
What is a Base45 Converter?
Base45 is an encoding defined in RFC 9285 that turns binary data into the 45 characters supported by the alphanumeric mode of QR codes: digits 0 to 9, uppercase A to Z, space and the symbols $ % * + - . / :. Because QR alphanumeric mode stores characters more densely than byte mode, Base45 produces smaller QR codes than Base64 for the same data.
How to use it
- Paste text to encode it into Base45, or paste a Base45 string to decode it.
- Copy the output.
How the encoding works
Input bytes are processed in pairs. Each pair is read as a 16-bit number n = a × 256 + b and written as three Base45 digits c, d, e such that n = c + d × 45 + e × 45². A trailing single byte becomes two characters. The result is roughly 1.5 characters per byte.
Example
The text AB is bytes 65 and 66, so n = 65 × 256 + 66 = 16706. Dividing: 16706 = 11 + 45 × 11 + 2025 × 8, giving digits 11, 11, 8, which map to BB8. Decoding BB8 reverses the steps and returns AB.
Where you will see Base45
- EU Digital COVID Certificates: the QR payload starts with
HC1:followed by Base45 data, which is zlib-compressed CBOR/COSE. - Other signed health and travel credentials that follow the same pattern.
- Any application that needs compact binary data inside a QR code.
Decoding a health certificate here only reveals the compressed binary payload; it must still be decompressed and parsed as CBOR to read the fields.
Frequently Asked Questions
Why use Base45 instead of Base64 in QR codes?
QR codes have an alphanumeric mode that stores the 45 Base45 characters more compactly than bytes. Base45 data therefore produces a smaller, easier-to-scan QR code.
What does HC1: mean in a QR code?
It is the prefix of EU Digital COVID Certificates. The rest of the string is Base45-encoded, compressed CBOR data.
Is Base45 encryption?
No. It is a reversible encoding. Anyone can decode it, although the data inside may be signed.
Which RFC defines Base45?
Base45 is specified in RFC 9285, published in 2022.