2026-08-17 # Nested QR Codes
The outer QR code scans to "OUTER" and the inner QR code scans to "INNER"
sona sin mi
I saw dithered QR codes online recently. The method relies on a feature (read "flaw") of QR code scanners - which target the center of each data block when scanning the image. As long as the center of the data block (determined by QR code structure) is the correct value, then the scanner will ignore the edges of the block. This is different from how companies embed their logo into a QR code, which literally removes data from the QR code, relying on error correction.
I figured that if you could fill the latent space with some bespoke pattern or image, why not another QR code? To make sure the inner QR code could scan correctly, I offset it by 1/3 the size of data blocks of the other QR code, and scaled it the same. This way, the center of each data block for the inner QR code would not overlap the center of each data block in the outer QR code. The inner QR code's structure is not *entirely* distinguishable, and it does have the hole punched out of it for the outer QR code's alignment mark, but they both seem to scan just about as easily on my phone... Surprisingly, I realised the whitespace around the position markers in the outer QR code could function as the bordering whitespace for the inner QR code, or at least part of it. :)
retrodev@spud:~/ > zbarimg nested_qr.png
QR-Code:INNER
QR-Code:OUTER
scanned 2 barcode symbols from 1 images in 0.02 seconds
So, who is going to make the first triple-nested QR code?