QR Codes
Makes real QR codes, shows how one is built, lets you damage it to see what it survives, and reads codes from pictures. All of it in this page: nothing you type or open is sent anywhere.
Where they came from
Barcodes ran out of room on Japanese car production lines. A box of parts could need several of them, each holding about 20 characters and each scanned in turn, and workers were scanning them all day to keep the kanban cards in step with the parts. In 1994 Denso Wave, then a division of the Toyota group's parts maker Denso, released a square code that held far more and could be read from any angle. The team was led by Masahiro Hara. The story goes that the idea of a grid of black and white came to him over a game of Go.
The hard part was the finder. They needed a mark that wouldn't turn up by chance in anything printed on a box, so they surveyed printed matter and settled on the ratio least often seen: dark, light, dark, light, dark at 1:1:3:1:1. It looks the same along any line through its centre, whichever way up the code is. Denso Wave chose not to enforce its patent, which is much of why the code spread. It became an international standard, ISO/IEC 18004, in 2000. "QR Code" is a registered trademark of Denso Wave.
Reed-Solomon codes, which do the mending, are from Irving Reed and Gustave Solomon, 1960. The BCH codes guarding the format information are named after Bose, Ray-Chaudhuri and Hocquenghem.
How to use it
- MAKE: type, or fill in a form. The code redraws as you go. PNG and SVG are generated in the page. Black on white scans best, and it warns you if your colours won't.
- HOW IT WORKS: your code, built from nothing. STEP moves on one go, START runs through (PAUSE and RESUME), NEXT PART skips ahead. Point at any module to see what it is; click to keep it marked.Tap any module to see what it is.
- DAMAGE: scribble, blot, or stick a logo on. The reader here does real Reed-Solomon correction and says how many of each block's mends it used, for all four levels.
- READ: open, drop or paste a picture, or use a camera if your browser allows one.
QR code scams
A QR code hides where it goes, so criminals stick their own over the real ones on car park meters and restaurant tables, or put them in emails. It is called quishing. Look at the address your phone shows before you open it, and be wary of any code asking you to log in or pay. The READ tab never opens anything by itself, and shows you where a link goes first.
What's real here, and what's simplified
- Written from the standard: versions 1 to 40, all four levels and block structures, numeric, alphanumeric and byte modes with the cheapest mix of segments, all 8 masks and their 4 penalty rules, format and version information.
- Not written: Kanji mode, Micro QR, and joining several codes together (structured append). READ does read Kanji where the browser knows Shift JIS.
- Text beyond plain ASCII goes in as UTF-8 with no extra marker. The standard's default is ISO 8859-1, but phones look at the bytes and work out it is UTF-8. A marker exists (ECI), but some readers handle it worse than no marker at all.
- The standard's third penalty rule is worded loosely, and encoders count it differently, so two generators can pick different masks for the same text. Both codes are valid. This one counts the 11-module pattern fully inside the code.
- DAMAGE reads a module as dark or light by what covers its centre, and already knows where the grid is. A camera has to find the grid first, so hitting the finders can kill a code that this reader would mend. SEND TO READ tests that with the picture reader, which works from the pixels.
- It treats every damaged byte as an unknown error, so a block with E check bytes mends E ÷ 2. A reader that knows which bytes are lost could mend twice that. The standard also holds a few back on the smallest codes as a guard against false reads; this reader doesn't.
- The reader expects a code seen roughly straight on. A mild tilt or any rotation is fine; a curved or heavily angled code may not be, even where a phone copes.
Nothing is stored. A link made with COPY LINK can hold plain text, never a Wi-Fi password or contact details. Pictures and camera frames never leave this tab.
FURTHER WATCHING AND READING