Introduction
Base45 is a binary-to-text encoding standardized in RFC 9285 that uses a 45-character alphabet to pack data more densely than Base64. It was introduced by the European Union Digital COVID Certificate (EUDCC) gateway so that QR codes carrying vaccination, test, and recovery credentials stay small enough to scan reliably on phone screens. This tool encodes and decodes Base45 entirely in your browser, with no data sent to a server.
What this tool does
- Encodes UTF-8 text or raw bytes into the Base45 alphabet defined in RFC 9285.
- Decodes Base45 strings back to bytes and renders them as UTF-8 text or hex.
- Reports invalid input length and out-of-alphabet characters with a clear error.
- Updates the result in real time as you type, with a copy-to-clipboard button.
- Processes all data locally in your browser with no network requests.
How this tool works
Type or paste text into the input field and pick whether to encode or decode. The encoder converts the input to UTF-8 bytes, then groups them into 16-bit triples and emits three Base45 characters per pair of bytes (with a shorter tail group for the final 1 or 2 bytes). The decoder reverses this, validating that every character belongs to the RFC 9285 alphabet and that the length is consistent with a valid Base45 stream. All computation runs client-side using a pure JavaScript implementation.
How Base45 works
Base45 was specified by the IETF in RFC 9285 (2022), authored by P. Faltstrom, F. van der Ham, and J. Schildknecht. The alphabet is `0-9A-Z $%*+-./:` (45 symbols), chosen to avoid characters that confuse QR scanners and to keep the encoding case-insensitive. Each pair of input bytes (a 16-bit value) maps to three Base45 characters, giving an expansion ratio of 3:2 (1.5x) — better than Base64's 4:3 (1.33x) at the cost of a larger alphabet. The EU Digital COVID Certificate system mandates Base45 because smaller QR codes scan faster and more reliably on damaged or low-contrast displays.
How to use this tool
- Choose Encode or Decode using the mode toggle.
- Paste your text (when encoding) or Base45 string (when decoding) into the input.
- The result appears instantly in the output field.
- Use Copy to copy the result to your clipboard.
- Switch modes or edit the input at any time; the output updates automatically.
Real-world examples
Encoding a short string
Input: `Hello` → Output: `%69 VD82EK4F.0A%68S`. The same input always produces the same output and the round trip back to `Hello` is lossless.
Decoding an EU DCC fragment
Input: `NC1AY%...` (a Base45 fragment from a vaccination QR). The decoder reconstructs the underlying CBOR bytes, which the EU gateway then wraps as a COSE-signed JWT.
Out-of-alphabet character
Input: `Hello!` for decoding. `!` is not in the Base45 alphabet, so the tool reports an error rather than producing a wrong result.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| Base45 | O(n) — 3 chars per 2 bytes | EU DCC QR codes, compact QR payloads |
| Base64 | O(n) — 4 chars per 3 bytes | Email attachments, data URIs, JWT |
| Base32 | O(n) — 8 chars per 5 bytes | Case-insensitive storage, OTP secrets |
| Base85 | O(n) — 5 chars per 4 bytes | PDF and PostScript binary payloads |
Limitations or considerations
Base45 is not a compression algorithm; it expands data by 50%. It is not cryptographically secure — anyone with the alphabet can decode it. The decoder rejects inputs whose length is not a valid Base45 stream (1 mod 3, 2 mod 3, or 0 mod 3 with valid tail). This tool does not validate the COSE/CBOR structure of EU DCC payloads; it only handles the Base45 layer.
Frequently asked questions
Why was Base45 created when Base64 already exists?
Base45 was designed for QR codes carrying EU Digital COVID Certificates. Its 45-character alphabet produces smaller QR symbols than Base64, which scan more reliably on phone screens and printed paper.
Is Base45 case-sensitive?
No. The alphabet is `0-9A-Z $%*+-./:` and is case-insensitive in practice because uppercase letters are the only letters used. The decoder in this tool accepts lowercase input by uppercasing it first.
Can I use Base45 for binary data like images?
Yes, but it is rarely the best choice outside of QR code payloads. Base64 has wider tooling support and Base85 is denser for general binary-to-text use.
Does this tool validate EU DCC signatures?
No. This tool only handles the Base45 encoding layer. To inspect the COSE/CBOR/JWT structure of an EU DCC, decode the Base45 here and then use the ASN.1/DER or JWT tools on this site.
Conclusion
The Base45 encoder/decoder gives you a fast, RFC 9285-compliant way to handle the encoding used by EU Digital COVID Certificate QR codes. With real-time conversion, clear error reporting, and a fully client-side implementation, it is a reliable tool for inspecting and producing Base45 payloads without sending any data to a server.