Base45 to Text Converter
Decode Base45 encoded strings to plain text instantly. Supports RFC 9285 standard, EU Digital COVID Certificates, and bulk decoding.
About
Base45 is a binary-to-text encoding scheme defined in RFC 9285, designed to represent arbitrary byte sequences using a 45-character alphabet optimized for QR code alphanumeric mode. It gained prominence as the encoding layer in EU Digital COVID Certificates (EU DCC), where a compressed CBOR/COSE payload is Base45-encoded before being rendered as a QR code. Incorrect decoding - wrong character mapping, mishandled padding, or ignoring the triplet/pair structure - produces corrupted output that silently breaks downstream CBOR parsing. This tool implements the full RFC 9285 decode pipeline with strict validation: character set enforcement, length parity checks, and value-range verification at each decode step.
The encoding efficiency of Base45 is approximately 2.0 input bytes per 3 output characters, yielding a data expansion factor of roughly 1.5ร. This is less compact than Base64 (1.33ร) but optimal for QR alphanumeric mode, which encodes 2 characters in 11 bits. Attempting Base64 in a QR code forces byte mode, which costs 8 bits per character - making Base45 the superior choice for that specific transport. This tool approximates decoded output as UTF-8 text; binary payloads (e.g., compressed ZLIB streams) will display as raw bytes. For EU DCC data, the decoded output typically begins with a ZLIB header (0x78) and requires further decompression.
Formulas
Base45 decoding operates on groups of characters. A triplet of Base45 characters decodes to 2 bytes. A trailing pair decodes to 1 byte. The string length must satisfy len mod 3 โ 1.
For a triplet (c0, c1, c2):
n = c0 + c1 ร 45 + c2 ร 452Constraint: n โค 65535 (i.e., 216 โ 1)
Decoded bytes: byte0 = n รท 256 (integer division), byte1 = n mod 256
For a trailing pair (c0, c1):
n = c0 + c1 ร 45Constraint: n โค 255
Decoded byte: byte0 = n
Where ci is the integer value (0 - 44) of the i-th character in the Base45 alphabet. The total output length in bytes is: 2 ร floor(len รท 3)1 + (1 if len mod 3 = 2, else 0).
Reference Data
| Character | Value | Character | Value | Character | Value |
|---|---|---|---|---|---|
| 0 | 0 | F | 15 | U | 30 |
| 1 | 1 | G | 16 | V | 31 |
| 2 | 2 | H | 17 | W | 32 |
| 3 | 3 | I | 18 | X | 33 |
| 4 | 4 | J | 19 | Y | 34 |
| 5 | 5 | K | 20 | Z | 35 |
| 6 | 6 | L | 21 | (space) | 36 |
| 7 | 7 | M | 22 | $ | 37 |
| 8 | 8 | N | 23 | % | 38 |
| 9 | 9 | O | 24 | * | 39 |
| A | 10 | P | 25 | + | 40 |
| B | 11 | Q | 26 | - | 41 |
| C | 12 | R | 27 | . | 42 |
| D | 13 | S | 28 | / | 43 |
| E | 14 | T | 29 | : | 44 |