Curious · 17 November 2026 · 4 min read

Masahiro Hara and the three squares that let a QR code be read from any angle

In 1992 a Denso engineer set out to replace the strings of barcodes on Japanese car-parts boxes. Two years later his team released the QR code. The squares in its corners, and the decision not to charge anyone for using it, are why it is on menus and tickets today.

A desk with a keyboard, an old mobile phone and a scatter of small square black-and-white QR code labels on paper; a hand rests on a paper cutter in the background. Each label has the three square corner markers.
Laminated QR code labels being cut out for a trial at Derby Museum, which let visitors open Wikipedia articles on geology and geologists from their phones. Photo: Roger from Derby, UK, CC BY-SA 2.0, via Wikimedia Commons.

At car-parts plants in Japan in the early 1990s, a box could carry so many barcodes that a worker had to scan it again and again. Masahiro Hara, an engineer at the Japanese car-parts maker Denso, later wrote that about ten different barcodes had to be read at manufacturing plants to keep track of things.

In 1992 he set out to replace them with one code. In his own account, published in 2019 in Synthesiology, a journal of Japan’s National Institute of Advanced Industrial Science and Technology, he says the work began with just two people and no development budget. In 1994 Denso released the result. It called it the QR code, for Quick Response.

The problem was finding the code

A barcode holds very little. IEEE Spectrum notes that the common UPC barcode carries up to 12 numbers; the European Patent Office (EPO) puts the barcodes of the day at about 20 characters. Two-dimensional codes, which store information across and down, already existed and held far more. Their weakness was speed. A reader had to work out where the code was and which way up it sat before it could decode anything.

Hara’s answer was the three squares in the corners. Each one is drawn so that a line through its centre, in any direction, crosses black, white, black, white and black bands in the ratio 1:1:3:1:1. He wrote that his team chose that ratio after surveying the black and white patterns in printed letters and figures, and found it almost never occurred. A scanner that meets that rhythm three times knows it has found a QR code, where its corners are and how it is turned.

IEEE Spectrum, drawing on an interview Hara gave the Japanese broadcaster NHK World-Japan, adds a picture of where the idea came from. Hara was on a train to work. “I was just looking out the window when I noticed a tall building standing out from its surroundings,” he told NHK. The code, he realised, needed a mark that stood out in the same way. The same report says the ratio took about three months of testing.

Fast, dense and hard to spoil

Hara’s paper gives the specification. The largest QR code holds 7,089 numerals, 4,296 letters and numbers, or 1,817 Japanese kanji characters. In the IEEE article he is quoted giving the figure as 7,087 digits; the EPO says about 7,000. The difference is small, and the paper’s table is the more formal source.

The sources also measure speed against different things. Hara’s paper says a QR code reads in about 30 milliseconds, as fast as a barcode, but carries five times the information, and is about 50 times quicker to process than other matrix codes of the day. The EPO says 20 times faster than earlier matrix codes. IEEE quotes Hara saying it reads five times faster than a typical barcode.

The code also repairs itself. It uses Reed–Solomon error correction at four levels, which Hara’s paper says recover the data when 7, 15, 25 or 30 per cent of the code is soiled or damaged. That is why a creased label or a scuffed sticker still scans.

The Go board story

Many accounts say the QR code was inspired by Go, the board game played with black and white stones. IEEE Spectrum reports it, again from the NHK interview: on a Go board a stone placed slightly off the intersection is still read as being on it, and Hara applied that tolerance to his code.

It is worth knowing where the story stops. Hara’s own ten-page paper on the code’s development does not mention Go at all, and nor does the EPO’s page. The Go board is Hara’s story, as told to a broadcaster; the 1:1:3:1:1 survey is the part he wrote down in detail.

Free to use, but patented

The usual telling is that Denso gave the QR code away. Hara’s paper is more precise. The company declared the code free to use with no patent claims, and later standardised it: an international ISO standard came in 2000. But it kept its patents. IEEE Spectrum lists them: the United States in 1998, Japan in 1999 and Europe in 2000. Hara explains why: “Possession of patent rights proved that we would not be sued for any patent violation.” The patents also let Denso stop poor copies; he writes that the company issued only one warning. The core image-recognition method was kept as a trade secret.

The openness worked. Hara writes that use spread explosively after 2010. He was a finalist for the European Inventor Award in 2014 with colleagues including Takayuki Nagaya of Toyota Central R&D Labs, and in 2020 IEEE made the QR code one of its engineering Milestones.

For more on everyday things with surprising origins, read how Percy Shaw invented the cat’s eye, or how David Warren came up with the black box flight recorder.

Try it yourself

More things to do in Curious →

Sources

Quotes are taken from the sources above. We link to the original reporting so you can read the full story.

Was this one for you?

#qr-codes #inventions #engineering #japan #technology #history

Keep reading

The Second Start — our free email list

Our email is starting soon: one real story and one thing to try. Join now to get the first one. Free: the 7-Day Restart Plan (PDF) when you join.

Make this site yours

Three quick questions and we'll show you what fits: no beginner tips if you're already fit, no marathons if you're just starting. It stays in this browser, and you can change it any time.

How active are you at the moment?
Your age (optional)
What interests you? (pick any)