Alphanumeric Mode
Alphanumeric Mode is the second most data-efficient of the four QR code encoding modes. It supports 45 characters: digits 0-9, uppercase letters A-Z, space, and the symbols $, %, *, +, -, ., /, and :. Notably, lowercase letters are not included.
The compression pairs two characters into 11 bits. Each character is assigned a value from 0 to 44; the first character's value is multiplied by 45 and added to the second character's value, then encoded in 11 bits. A trailing single character uses 6 bits. This allows up to 4,296 characters per QR code.
The full 45-character set
| Group | Characters | Values |
|---|---|---|
| Digits (10) | 0 1 2 3 4 5 6 7 8 9 | 0-9 |
| Uppercase letters (26) | A-Z | 10-35 |
| Space (1) | (space) | 36 |
| Symbols (8) | $ % * + - . / : | 37-44 |
The value 0-44 assigned to each character feeds the pair compression formula (first character × 45 + second character, stored in 11 bits). Characters missing from this table - such as underscore (_), question mark (?), or ampersand (&) - force the whole string into Byte Mode.
A concrete capacity comparison
Take the 32-character URL "HTTPS://QRAFT.CC/JA/GLOSSARY/QR/" written in uppercase: encoded in Alphanumeric Mode, the data payload takes 16 pairs × 11 bits = 176 bits. The same 32 characters with lowercase letters fall back to Byte Mode at 8 bits per character, requiring 256 bits - roughly 30% more. When that difference crosses a version boundary, the printed QR code visibly grows one size step.
URLs are a common use case, but there is a practical trick: since URLs typically contain lowercase letters, they default to Byte Mode. Converting the URL to uppercase before generating the QR code triggers Alphanumeric Mode, cutting the data payload by roughly 30% (8 bits per character down to 5.5). HTTP schemes and domain names are case-insensitive, so uppercase conversion works safely, though care is needed if the server's path or query parameters are case-sensitive.