The History of Codes

Masahiro Hara and the Invention of the QR Code

The engineer who invented the QR code drew inspiration from the board game Go. Meet Masahiro Hara and the Denso Wave team.

The invention of the QR code is really the story of one engineer, a nagging factory problem, and an unexpected spark from a Japanese board game. Masahiro Hara did not set out to change how billions of people share links and menus. He just wanted to stop scanning ten barcodes when one would do. 🐾

Who invented the QR code?

The QR code was invented in 1994 by Masahiro Hara, an engineer at Denso Wave, a subsidiary of the Toyota group in Japan. Hara led a small team, and the project began as a very practical response to the limits of the ordinary barcode on the manufacturing line.

Denso Wave supplied technology to the automotive industry, and Toyota's production system demanded fast, accurate tracking of enormous numbers of parts. The one-dimensional barcode, invented decades earlier, simply could not carry enough information to keep up. You can read that earlier chapter in our brief history of the barcode.

What was wrong with the old barcode?

A traditional 1D barcode stores data only in the widths of its vertical stripes. That gives it a hard ceiling of roughly 20 characters. On a busy assembly line, that was nowhere near enough.

Workers ended up plastering boxes with several barcodes at once, then scanning each label separately. It was slow, tiring and easy to get wrong. Hara's brief was to design something that could:

  • Hold hundreds or thousands of characters instead of a couple of dozen.
  • Be read in a flash, hence the name "Quick Response".
  • Work even when partly smudged, scratched or torn.
  • Be scanned from any direction without careful alignment.

The solution was to add a second dimension. By encoding data both across and down, a two-dimensional symbol packs vastly more information into the same footprint. Our explainer on 1D vs 2D barcodes shows exactly why that matters.

How did the game of Go inspire the QR code?

Here is the detail people love most. Hara was reportedly a fan of Go, the ancient strategy game played with black and white stones on a grid. Staring at that lattice of stones on a board, he saw a natural way to represent information: a matrix of filled and empty cells, black and white, arranged in two dimensions.

The visual logic of Go, a grid of black and white points, helped shape the idea of encoding data as a field of light and dark squares rather than a row of stripes.

That grid became the data area of the QR code: the dense field of small squares, called modules, that carries the actual payload. For a component-by-component tour, see our anatomy of a QR code.

How did Hara solve the any-angle problem?

A grid of squares is only useful if a scanner can find it and figure out which way is up. This was the toughest challenge, and Hara's answer is the QR code's most recognizable feature: the three nested squares in the corners, known as finder patterns.

To make sure a scanner would never confuse the code with surrounding text or images, Hara's team analyzed a huge range of printed material to find a pattern of black-and-white proportions that almost never occurs by chance. They settled on a ratio of dark and light regions (roughly 1:1:3:1:1) that a scanner can detect along a line drawn from any direction.

Because that ratio is so distinctive, the reader instantly locates the three corners, works out the code's orientation and size, and reads the data correctly whether the code is upright, sideways or upside down. That is the "any-angle readability" the whole project was built around. Our guide to how QR codes work traces this recognition step in detail.

How did error correction make QR codes tough?

Factory labels get dirty and damaged, so Hara built in robust error correction. QR codes use Reed-Solomon mathematics, the same family of techniques that protect CDs and deep-space transmissions, to reconstruct data even when part of the symbol is missing.

Depending on the chosen level, a QR code can lose up to around 30 percent of its area and still scan. This is why a code can survive a coffee ring, a crease or even a small logo placed in the middle. If you want the mathematics, we cover it in Reed-Solomon error correction.

Why did Denso Wave make the QR code patent-free?

Perhaps the most consequential decision was not technical at all. Denso Wave patented the QR code but chose not to exercise its patent rights against anyone using the standard. In practice, that made the format free to use for anyone who followed the specification.

The reasoning was strategic and generous at once. A proprietary code that cost money to use would stay locked inside a handful of companies. A free code could spread to every industry on earth. Denso Wave bet that widespread adoption would be worth more than licence fees, and that it could profit by selling readers and systems instead.

The bet paid off spectacularly. The QR code became an open international standard, ISO/IEC 18004, and today anyone can create a free QR code without asking permission or paying a cent. We unpack the ownership question further in who owns the QR code.

What is Masahiro Hara's legacy?

For years, the QR code was a quiet industrial success. Hara himself has said he was surprised to see his invention leap from factory floors to smartphones, payment apps and museum walls. The features he designed for grease-stained parts bins turned out to be exactly what a mobile, contactless world needed.

Hara has received engineering honors for the invention, and the QR code is now recognized as one of the most influential pieces of information design of its era. Not bad for a tool born to count car parts. For the wider adoption story, read the history of the QR code.

Frequently asked questions

Who invented the QR code?

Masahiro Hara, an engineer at Denso Wave (a Toyota group subsidiary), led the team that invented the QR code in 1994.

How did the board game Go inspire the QR code?

Hara, a Go enthusiast, drew on the game's grid of black and white stones as a model for encoding data in a two-dimensional matrix of light and dark squares.

What is the purpose of the three corner squares?

They are finder patterns. Their distinctive black-and-white ratio lets a scanner locate and orient the code from any angle, almost instantly.

Why did Denso Wave not charge for the QR code?

The company decided that free, widespread adoption was more valuable than licence fees, so it chose not to enforce its patents against standard-compliant use.

Did Masahiro Hara expect the QR code to become so popular?

By his own account, no. He designed it for industrial tracking and was surprised when smartphones and the pandemic pushed it into everyday consumer life.

Make a QR code the honest way 🐾

Free forever, no tracking, no expiry — generated right in your browser.

🎨 Create a QR code →