Cracking the QR Code
It s simpler than you might think.
Embed this infographic on your site
Whether or not you realize this, you probably know what a QR code is. Theyíre everywhere from shipping labels to magazine covers to fliers on community boards. Some companies like Coca-Cola and American Airlines have gotten clever and worked them into their print ads. The question is, whatís stopping you from getting in the game? Maybe youíve tossed around the idea of making your own QR code, but decided it was too complicated or that you didnít have time to learn how they work. Well, itís actually much easier than it looks.
In any QR code, a square of either black or white is called a "module." The modules are grouped together into different sections. There are some sections you can mess with, and there are others that will render the code un-readable if you alter them. The untouchables are easy to spot.
In this example, the zones are highlighted in various colors:
- Red Ė Position Markers. They define the edges of the readable area and the alignment of the modules.
- Green – Format Information. These tell the software whether the data is a url, plain text, numbers, Kanji, etc.
- Blue – Version Information. The version simply refers to the number of modules in the code (version 1 is the smallest (21 x 21)). This can be altered on versions 6 and below.
If you mess with these areas, the chances of a successful scan are severely reduced. Weíre talking single-digit percentages.
I call it the playground because anything can happen here. Everything thatís not highlighted in the above example is where the actual information is stored in the code. The modules are grouped into clusters of 8, and those clusters fit together like puzzle pieces. Itís essentially binary, where the white modules are 0ís and black modules are 1ís. They fit together like this:
Here, the ďno-zonesĒ are all highlighted purple, while the 8-bit clusters are represented by the interlocking gray shapes. Each of these clusters (a.k.a. bytes) represents one character.
Now, hereís the really cool part. All QR codes have built-in error correction algorithms, so that you can cover up/remove/alter up to 25%-30% of them without sacrificing readability.
The only rule here is that you must alter complete bytes. If you alter even one module in a byte, the entire byte will be discarded, so you may as well make the best use of the real estate and alter all 8 modules in that byte.
In the following example, I selected ľ of the bytes in the code and rearranged the modules within them. Once that worked, I completely eliminated them altogether. It still scanned. I replaced the bytes with the face of one of the most iconic friendly aliens other than E.T. himself.
On Your MarkÖ
So, where do you go from here? You know how QR codes work; you know what you can mess with and what you canít. The internet is full of QR code generators. Find one, get yourself a QR code of your own, and then use the photo editing software of your choice to start adding your own flare. It can get time consuming, but if you map out the locations of each byte before you start, it will be much easier to figure out which ones you can edit and which ones you must leave alone. Itís best to have a phone handy with several QR code-scanning apps, lots of free time, and an experimental mindset. See what works and what doesnít. Alter it as much as possible while keeping it readable. Pretty soon, youíll be making things like this.