SHOUT For Smaller QR Codes

QR codes have been with us for a long time now, and after passing through their Gardenesque hype cycle of inappropriate usage, have now settled down to be an important and ubiquitous part of life. If you have ever made a QR code you’ll know all about trying to generate the most compact and easily-scannable one you can, and for that [Terence Eden] is here with an interesting quirk. Upper-case text produces smaller codes than lower-case.

His post takes us on a journey into the encoding of QR codes, not in terms of their optical pattern generation, but instead the bit stream they contain. There are different modes to denote different types of payload, and in his two examples of the same URL in upper- and lower- cases, the modes are different. Upper-case is encoded as alphanumeric, while lower-case, seemingly though also containing alphanumeric information, is encoded as bytes.

To understand why, it’s necessary to consider the QR codes’ need for efficiency, which led its designers to reduce their character set as far as possible and only define uppercase letters in their alphanumeric set. The upper-case payload is thus encoded using less bits per character than the lower-case one, which is encoded as 8-bit bytes. A satisfying explanation for a puzzle in plain sight.

Hungry for more QR hackery? This one contains more than one payload!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.