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.
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, reducing data size by roughly 40%. 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.