Base45 Encoder and Decoder
Encode text or files as RFC 9285 Base45, or decode Base45 text back to bytes. Designed for compact use with QR alphanumeric mode.
Runs in your browser — your input is processed on this device and never uploaded.
Input
Enter text or upload a file to encode. To decode, enter the encoded text.
Result
Results appear here.
About this tool
On this page
What is Base45?
Base45 writes binary data with 45 characters: the digits, the uppercase letters, the space and $%*+-./:. RFC 9285 defines it to fit the alphanumeric mode of QR codes, which stores exactly those 45 characters more compactly than arbitrary bytes.
Base45 options
- Operation
- Encode (the default) or Decode.
- Input
- Text or a file to encode, or Base45 text to decode. Decoding returns the original bytes, so binary payloads round-trip, not just text.
- Every 2 input bytes become 3 characters, and a final odd byte becomes 2.
- There is no alternate alphabet and no padding.
Why use Base45 instead of Base64 in a QR code
A QR code stores Base64 in byte mode, where every character costs 8 bits, so 3 bytes of data take 32 bits. Base45 text fits alphanumeric mode, which packs 2 characters into 11 bits, so 2 bytes of data take about 16.5 bits. The Base45 string is longer, but the code that carries it is smaller.
That is why the EU Digital COVID Certificate encoded its signed CBOR payload as Base45 before drawing the QR code.
Base45 alternatives
Base64 is shorter as text and the right choice anywhere other than a QR code. Base32 is the case-insensitive option for values people read and type. QR Code Generator draws a code from text, such as a Base45 string.
Things to know about Base45
The alphabet includes a space and the characters $%*+-./:, so a Base45 string is not safe to drop into a URL or a shell command without escaping. Inside a QR code, where it belongs, that does not matter.
Warning
Base45 is an encoding, not encryption or compression. Anyone can decode it, and a successful decode says nothing about whether the content is safe or authentic.
Browse
Find similar tools by category or tag.