Base45 Converter: Encode and Decode Base45 (RFC 9285) Online
Learn how Base45 Converter encodes and decodes RFC 9285 Base45 text entirely in your browser β the compact encoding behind EU Digital COVID Certificates and efficient QR code payloads.
Table of Contents
Base45 is one of those encodings that quietly powers something hundreds of millions of people have used: the QR codes on EU Digital COVID Certificates. Defined in RFC 9285, Base45 converts arbitrary binary data into a compact, printable string using a carefully chosen 45-character alphabet β one that maps perfectly onto the alphanumeric mode of QR codes. If you have ever scanned a green pass and wondered what sits between the binary certificate data and the QR pattern, the answer is Base45.
Our free Base45 Converter encodes and decodes Base45 text entirely in your browser. There are no uploads and no server round-trips: your input is processed locally with full UTF-8 support, converted instantly, and never leaves your device. Whether you are debugging a health certificate pipeline, inspecting a QR payload, or just curious how the encoding works, the tool gives you accurate results in milliseconds.
In this guide, we will walk through why Base45 exists, how the encoding works at the byte level (including the official RFC 9285 test vector), the converter's key features, and the practical situations where you will actually need it.
Why Use Base45?
- Optimal QR code density β QR codes have an alphanumeric mode that encodes character pairs in just 11 bits. Because Base45 uses exactly 45 characters, two Base45 characters fit precisely into those 11 bits, making QR payloads significantly smaller than byte-mode encodings.
- Smaller codes, faster scans β Fewer encoded characters mean a lower QR version, fewer modules, and codes that remain scannable even when printed small or displayed on low-resolution screens.
- Printable, safe output β The Base45 alphabet consists only of digits, uppercase letters, and a handful of symbols (space $ % * + - . / :). The output survives copy-paste, logging, and text transport without escaping headaches.
- Standardized and interoperable β RFC 9285 defines the alphabet and algorithm unambiguously, so a Base45 string produced by one implementation decodes identically in any other.
- Proven in production β Base45 was selected for the EU Digital COVID Certificate scheme, one of the largest real-world deployments of QR-based verifiable credentials.
- Fully reversible and transparent β Unlike hashing or encryption, Base45 is a plain encoding: anyone with the string can recover the original bytes, which makes it ideal for inspection and debugging.
Key Features
| Feature | Details |
|---|---|
| Encode & decode modes | One-click toggle between text β Base45 and Base45 β text |
| RFC 9285 compliant | Implements the official 45-character alphabet and chunking rules exactly |
| UTF-8 safe | Uses TextEncoder/TextDecoder, so emoji and non-Latin scripts round-trip correctly |
| Instant conversion | Results appear as you type β no submit button, no waiting |
| Clear error messages | Invalid characters and bad chunk lengths are reported explicitly |
| 100% client-side | Everything runs in your browser; nothing is uploaded or stored |
| Free to use | No account, no limits, no watermark |
- UTF-8 handling matters more than it looks. Base45 operates on bytes, not characters. By encoding input as UTF-8 first, the converter correctly handles multilingual text and emoji β a common failure point in naive implementations that assume one character equals one byte.
- Errors you can act on. If you paste a string containing characters outside the Base45 alphabet (such as lowercase letters), or a payload whose final chunk has an impossible length, the tool tells you exactly what went wrong instead of returning garbage.
- Privacy by architecture. Because conversion happens locally with standard browser APIs, the tool is safe for sensitive payloads such as certificate fragments or internal test data.
How to Use Base45 Converter
- Open the tool. Navigate to the Base45 Converter page in any modern browser.
- Choose your mode. Select Encode to turn text into Base45, or Decode to turn a Base45 string back into readable text.
- Paste or type your input. Enter plain text (for encoding) or a Base45 string (for decoding). Remember that Base45 output is case-sensitive and includes the space character as a valid symbol.
- Read the instant output. The result appears automatically as you type. For example, encoding AB yields BB8 β the official RFC 9285 test vector.
- Copy the result. Use the copy button to grab the output for your QR generator, test suite, or documentation. If the input is invalid, fix the highlighted issue and the output updates immediately.
How Base45 Encoding Works
Base45's design is elegantly simple. The alphabet is:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:
That is 45 characters: the ten digits, the 26 uppercase letters, and nine symbols β including the space at index 36. Each character represents a value from 0 to 44.
Encoding processes input bytes in chunks of two. Each pair of bytes b0, b1 is treated as a 16-bit integer n = b0 Γ 256 + b1 (range 0β65535), then expressed in base 45 as three digits: n = c0 Γ 45Β² + c1 Γ 45 + c2. The three digits are emitted least significant first β c2, c1, c0 β producing exactly three Base45 characters. If the input has an odd number of bytes, the final single byte becomes two Base45 characters using the same idea (n = c0 Γ 45 + c1, emitted as c1, c0).
Worked example: AB β BB8. The bytes are 65 and 66, so n = 65 Γ 256 + 66 = 16706. Dividing into base-45 digits: 16706 = 8 Γ 2025 + 11 Γ 45 + 11, giving c0 = 8, c1 = 11, c2 = 11. Looking up the alphabet (8 β 8, 11 β B) and emitting least significant first yields BB8 β the official test vector from RFC 9285. Other handy reference values: QR β SCA, Base45 β SH8LQE0R6, and Hello!! β %69 VD92EX0 (note the space in the middle β it is a legitimate Base45 character, not formatting noise).
Why QR alphanumeric mode loves Base45. QR codes support an alphanumeric mode that encodes character pairs from a 45-symbol set into 11 bits (since 45 Γ 45 = 2025 fits under 2048). The QR alphanumeric character set and the Base45 alphabet are the same set. That means every two Base45 characters cost exactly 11 bits β 5.5 bits per character β versus 8 bits per character in QR byte mode. For a payload of any size, that is roughly a 30% reduction in QR symbol size, which is precisely why the EU chose Base45 for its health certificates.
Practical Use Cases
EU Digital COVID Certificates (Green Pass)
The EU DCC pipeline is: CBOR β zlib compress β COSE sign β Base45 encode β QR code. Base45 is the final text layer before QR generation, and decoding it is the first step of verification. If you are building or auditing a DCC verifier, you will constantly move between Base45 strings and the binary COSE/CBOR structures inside them.
Debugging QR Payloads
When a QR-based system misbehaves, the payload is often a Base45 string. Decoding it lets you confirm whether the problem is in the encoding layer or deeper in the data structure β a fast way to rule out corruption, truncation, or character-set mistakes (lowercase input is a classic culprit).
Compact Data Transfer
Any workflow that ships binary data through QR codes or other alphanumeric-only channels benefits from Base45's density. Tickets, boarding passes, device pairing codes, and offline verification tokens all become smaller and more robust when Base45-encoded rather than hex- or Base64-encoded.
Interoperability and Testing CBOR Pipelines
Base45 frequently wraps CBOR payloads, so test suites for verifiable credentials need reliable encode/decode round-trips. Using the converter alongside a CBOR tool lets you validate each stage of the pipeline independently β encode known test vectors, decode captured payloads, and diff the results against expected values.
Best Practices
- Treat Base45 as case-sensitive and space-sensitive. bb8 is not the same as BB8, and stripping "extra" spaces from a payload will corrupt it β space is alphabet index 36.
- Validate before you decode. Reject any input containing characters outside the 45-symbol alphabet early; the converter does this automatically with clear error messages.
- Handle UTF-8 explicitly. Always encode text to UTF-8 bytes before Base45, and decode bytes back through UTF-8 afterward, or multilingual content will not round-trip.
- Verify with official test vectors. Use AB β BB8 and Hello!! β %69 VD92EX0 as smoke tests whenever you touch an implementation or upgrade a dependency.
- Remember it is not security. Base45 provides no confidentiality, integrity, or authentication. Never rely on it as a substitute for signing (COSE) or encryption in a credential pipeline.
- Mind your transport. When pasting Base45 between tools, check that no line wrapping, trimming, or URL-encoding has altered the string β especially trailing characters, since an invalid final chunk length makes decoding fail.
Start Encoding with Base45 Converter
Base45 is a small specification with an outsized real-world footprint, and working with it should not require installing anything. Open the Base45 Converter, toggle between encode and decode, and get RFC 9285-accurate results instantly β UTF-8 safe, error-checked, and processed 100% in your browser. Whether you are dissecting a green pass, shrinking a QR payload, or writing test vectors for a CBOR pipeline, it is the fastest way to move between text and Base45.
Related Tools You Might Like
Happy encoding!