---
title: "Base45"
description: "RFC 9285 base45. Two bytes as three characters from the alphanumeric set of a QR code"
canonical_url: "https://encodings.agntn.dev/encodings/base45"
---
# Base45

> RFC 9285 base45. Two bytes as three characters from the alphanumeric set of a QR code

<encoding-facts name="base45">



</encoding-facts>

Why 45? Because QR codes have an alphanumeric mode with exactly 45 characters, and it packs tighter than byte mode. Base45 turns two bytes into three of those characters, least significant first.

```ts
encode("base45", "Hello!!");  // "%69 VD92EX0"
encode("base45", "ietf!");    // "QED8WEX0"
```

Both straight out of RFC 9285. Yes, the space is part of the alphabet. So decoding skips nothing. EU Digital COVID Certificates were base45 inside a QR code. A triple worth more than 65535 is an error. So is a lone character at the end.


## Sitemap

See the full [sitemap](https://encodings.agntn.dev/sitemap.md) for all pages.
