Skip to content
AZ Tools

Base45 Encoder & Decoder

Encode text to Base45 and decode Base45 back to text, following RFC 9285, in your browser.

Output

How to use

  1. Choose encode (text to Base45) or decode (Base45 to text).
  2. Type or paste your input.
  3. Copy the converted result from the output box.

About this tool

Show

Convert text to and from Base45, the compact encoding defined in RFC 9285 and used inside QR codes such as the EU Digital COVID Certificate. Its alphabet is exactly the 45 characters a QR code can store in alphanumeric mode — digits, capital letters, space and a handful of symbols — and that is the whole point: those characters cost 5.5 bits each in a QR, so Base45 fits binary data into a smaller symbol than Base64 does, even though it produces more characters. Every two bytes become three characters, with a trailing odd byte becoming two. Text is handled as UTF-8, and decoding checks both the alphabet and the value ranges, so a truncated or edited payload is flagged rather than silently mangled.

Frequently asked questions

What is Base45?

Base45 is a binary-to-text encoding defined in RFC 9285. It packs two bytes into three characters from a 45-symbol alphabet, which is efficient to store in QR codes.

Where is it used?

Most notably in the EU Digital COVID Certificate and other QR-based systems, where the 45-character alphabet maps well onto QR code alphanumeric mode.

How are non-ASCII characters handled?

Text is encoded as UTF-8 first, so accented letters, emoji and CJK characters become their byte sequences and decode back exactly.

What happens with invalid Base45?

Decoding checks that every character is in the alphabet and that each group is a valid length and value. Invalid input shows an error instead of broken output.

Base45 output is longer than Base64 — so why use it for QR codes?

Because length in characters is the wrong measure. Base45 turns every 2 bytes into 3 characters, a fixed 1.5×, where Base64 is about 1.36×. But Base45's alphabet is exactly QR's alphanumeric set, which packs two characters into 11 bits — 5.5 bits each — while Base64 needs lowercase and so forces byte mode at 8 bits per character. For 100 bytes that is 825 bits of QR payload against 1,088, about 24% less, which is often a whole size class of symbol.

Can I put a Base45 string in a URL or a shell command?

Not without quoting it. The alphabet's last nine symbols are space, $, %, *, +, -, . / and : — so a Base45 string routinely contains a literal space, a percent sign that URL decoding will read as an escape, and a plus that form decoding will turn into a space. It is also uppercase-only, so anything that lowercases the string in transit destroys it. Base45 is designed for the inside of a QR symbol, not for a query parameter; percent-encode it or use Base64url if it has to travel in a URL.

Related tools