1. Three Big Squares Help a Scanner Find the Code from Any Angle
A scanner has a chore to do before it can read any data: find the code. Denso Wave, the company behind the QR code, says the three squares, which it calls position detection patterns and which sit at three corners of each code, let scanners detect the code regardless of the scanning angle[1]. That is why turning the code upside down changes nothing.
A simple way to picture the geometry, as an illustration and not as the makers' stated design reason, is that the three marked corners help a scanner work out how the code is turned. The company's pages do not say it was designed this way, and they do not explain why there are three squares rather than four.
What the makers do explain is how the squares are recognized. If you draw a line straight through the middle of one of them, you cross bands of black, white, black, white, black, in a width ratio of 1:1:3:1:1[1]. The team chose that ratio after an "exhaustive survey" of black-and-white areas in printed pictures and characters, studying "numerous printed matter day and night" until they found the ratio that appeared least often on printed pages[1]. A pattern that rarely shows up by accident in print is unlikely to be mistaken for something else.
That is the first surprise. One of the cleverest parts of the code was found by looking for what was rare, not by inventing something fancy.
2. Why a Japanese Auto-Parts Maker Needed a New Kind of Barcode
The code was developed at Denso, a Japanese maker of auto parts. (Today the code's official website is run by Denso Wave, which is why that name appears in this article's sources.) Denso's own account says that workers in manufacturing had to scan as many as about 1,000 barcodes a day. An ordinary barcode holds only about 20 characters, so a part often needed several of them[1]. An engineer named Masahiro Hara, who worked on barcode scanners, led a project that began in 1992 with a team of only two people, and after about a year and a half they had a new two-dimensional code[1].
A regular barcode only stores information along one direction, the way a sentence runs along a line. A QR code stores it across a square, both up-and-down and left-to-right. The official specification allows up to 7,089 digits in one code, or 2,953 letters and other text characters[3]. The name QR comes from "quick response," because speed of reading was a main goal[2].
Later retellings add colorful stories about where Hara's ideas came from, such as a board game of Go played at lunch and a tall building seen from a train[4]. They are not part of the company's own development account, so they are best treated as reported stories.
3. How QR Codes Went from Factory Floors to Restaurant Tables
For years, the QR code lived on factory floors. Denso Wave says it became widespread among the general public in Japan in 2002, when mobile phones with a QR-reading feature went on sale[2]. Later uses included business cards, electronic tickets, and airline ticketing at airports[2].
In the United States the wait was longer. According to Fortune, before 2017 an iPhone user had to download a separate reader app, since Apple only then let the built-in camera read QR codes, and even after that the codes "never really took hold." The pandemic changed that. By early 2021 the National Restaurant Association, the main trade group for US restaurants, reported that about half of full-service restaurant operators had added menus reached by scanning a QR code[5].
The second surprise is how patient a good idea can be. The code was announced in 1994. It became an everyday sight for many families in the United States only about a quarter of a century later.
4. Why Open Standards Helped QR Codes Spread
A patent is a legal right that lets an inventor stop other people from making or selling the invention without permission. Denso Wave kept its patent rights for the QR code, but it declared that it would not use them against anyone using the code as the standard describes[2]. The company's standards page says it would not use one patent to stop people from using QR codes that follow the standard[3]. That meant a phone maker, a software writer, or a restaurant did not have to ask for a license or pay to print or read a standard code.
Standards followed quickly: one from the industry group AIM in 1997, a Japanese national standard in 1999, and an international standard, ISO/IEC 18004, in June 2000[2][3]. A code that anyone may use, written down in a public rulebook, is easy for different companies and developers to build on. It is hard to say exactly how much that helped, but it fits the code's later history.
Try It Yourself: Find the Three Squares on a Real QR Code
- Hunt for the three squares. Find a QR code printed on something, such as a package, a flyer, or a menu. Point to the corner with no big square. Then turn the page a quarter turn at a time, and notice that you can always tell which way is "up" from the three squares alone. (You only need to look. Never scan a code you do not trust, and ask an adult before scanning one in a public place.)
- Check the 1:1:3:1:1 rule with a ruler. Look at one of the big squares. Its outer ring is one small square thick, then comes a ring of white, then a solid block of three small squares across. Count the small squares along a line through the center: 1, 1, 3, 1, 1. Try that on a printed code with small squares big enough to see.
- Read the makers' own story. Denso Wave's page on how the QR code was developed is free to read online, and it explains the ratio hunt in its own words. Compare it with the IEEE Spectrum article, and ask yourself which parts come from the company and which from later retellings.