Base45 Encoder & Decoder (RFC 9285)

Base45 is a binary-to-text encoding designed to pack efficiently into QR codes, and it is what the EU Digital COVID Certificate uses. Paste text to encode it to Base45, or paste Base45 to decode it back, following RFC 9285 exactly. Everything runs locally and updates as you type.

How to use the Base45 Encoder & Decoder (RFC 9285)

Pick Encode to turn text into Base45, or Decode to turn Base45 back into text, then type or paste into the input box. The result appears below and updates live; Copy output places it on your clipboard. Text is treated as UTF-8, so accented characters and emoji round-trip correctly.

The Base45 alphabet covers digits, uppercase letters, and a handful of symbols — 0-9, A-Z, space, and $ % * + - . / : — exactly the 45 characters defined by RFC 9285 and chosen to fit the QR code alphanumeric mode. When decoding, the input must use only those characters and its length must be valid (Base45 strings come in chunks of two or three characters), or the tool reports a clear error rather than producing garbage. Lowercase letters are not part of the alphabet, so a stray lowercase character is flagged.

It all runs in your browser with no network calls, so payloads stay on your machine, it works offline, and the conversion is instant.

Base45 and why QR codes need it

Base45 is a binary-to-text encoding standardized in RFC 9285, and its design is driven by one goal: fitting as much data as possible into a QR code. QR codes have a special alphanumeric mode that can store 45 distinct characters — the digits 0–9, uppercase A–Z, the space, and the symbols $ % * + - . / : — far more compactly than the general byte mode. By restricting its output to exactly those 45 characters, Base45 lets the data ride in that efficient mode, so a certificate or token encodes into a physically smaller, more reliably scannable QR code than Base64 would allow.

The math is a base conversion done two bytes at a time. A pair of bytes is a number from 0 to 65,535, and since 45³ = 91,125 is comfortably larger than 65,536, three Base45 characters are always enough to represent any pair — so every two input bytes become exactly three output characters. A single leftover byte at the end (when the input length is odd) is a number from 0 to 255, which fits in two characters because 45² = 2,025 exceeds 256. The characters within each group are emitted least-significant first, a small detail that trips up naive implementations but is exactly what the RFC specifies and what this tool follows.

Base45's most visible deployment is the EU Digital COVID Certificate, where a signed health credential is compressed, Base45-encoded, and rendered as a QR code that border officials and apps can scan offline. The same approach suits any compact, scannable token. The trade-off is that Base45 is slightly less space-efficient byte-for-byte than Base64 — its expansion is about 1.5× versus Base64's 1.33× — but that comparison misses the point: because the result lives in the QR alphanumeric mode, the final QR code is smaller overall. Decoding requires validation that each three-character group represents a value below 65,536 and each two-character group below 256, since not every string over the alphabet is a legal Base45 message; this tool performs those checks and reports a precise error when input is malformed.

Common use cases

  • QR code payloads. Encode data destined for a QR code so it uses the efficient alphanumeric mode.
  • Digital certificates. Decode or inspect EU Digital COVID Certificate-style Base45 strings.
  • Debugging. Convert a Base45 token you found in a system back to readable bytes.
  • Learning. See how RFC 9285 maps bytes to its 45-character alphabet.

Frequently asked questions

Why does Base45 exist when we have Base64?

Base45 restricts output to the 45 characters QR codes can store in their compact alphanumeric mode. Although it expands data a bit more than Base64, the resulting QR code is physically smaller and scans more reliably.

What characters are in the Base45 alphabet?

The digits 0-9, uppercase A-Z, the space, and the symbols $ % * + - . / : — 45 characters total, as defined by RFC 9285. Lowercase letters are not included.

Why does an odd-length input still work?

Bytes are encoded in pairs into three characters each; a single leftover byte becomes two characters. The decoder uses the chunk length to reverse this, so both even and odd byte counts are handled.

What is the EU COVID certificate connection?

The EU Digital COVID Certificate compresses a signed credential, encodes it with Base45, and renders it as a QR code. That is the encoding's best-known real-world use.