QR Code Basics

The History of QR Codes

The QR code was not invented for marketing, for phones, or for the public. It was invented in 1994 to solve a specific irritation on a Japanese car-parts production line: barcodes held too little data, and workers were having to scan up to ten of them per box. The decisions made while solving that problem — including one about patent enforcement that cost its inventor's employer a fortune — are why the format is on your restaurant table thirty years later.

The short version

  • Invented in 1994 by Masahiro Hara and his team at Denso Wave, a Toyota Group parts supplier.
  • Built to replace barcodes on factory floors — the goal was speed and capacity, hence "Quick Response."
  • The three corner finder patterns were inspired by the board game Go, and by a survey of printed material for the least-common pattern.
  • Denso Wave held the patent but chose never to enforce it, which is the single reason the format became universal.
  • Standardised as ISO/IEC 18004 in 2000; adoption exploded once phones could scan natively.

Before the grid: dots, dashes, and stripes

QR codes did not appear from nowhere in 1994. They are the end of a chain of ideas about turning information into marks a machine can read, and the chain starts about a century and a half earlier.

Morse: symbols as timed marks

Morse code, in commercial use from the 1840s, established the underlying idea: any message can be reduced to a small alphabet of marks, and a machine — or a trained operator — can turn those marks back into language. Two details of its design reappear in every encoding scheme since. It was variable-length, and the lengths were chosen by frequency: E, the commonest letter in English, is a single dot, while rarer letters run four or five symbols long. That is data compression, in 1840.

1948-1952: Morse pulled downwards

The jump from timed marks to printed ones has an unusually specific origin. In 1948 a graduate student named Bernard Silver overheard a food-chain executive asking Drexel Institute of Technology for a way to capture product information automatically at a checkout. Silver brought the problem to Norman Joseph Woodland.

Woodland, who had learned Morse as a Boy Scout, worked on it over the following winter in Miami Beach. The account he gave for the rest of his life is that he was sitting on the sand thinking about dots and dashes, drew four of them with his fingers, and then simply pulled his hand downwards — turning the dots and dashes into narrow and wide lines. Encoding by mark width rather than duration is the whole of the barcode, and it arrived in one gesture.

The form he and Silver patented was not the striped rectangle we know now. It was a bullseye of concentric circles, chosen so it could be read from any direction — a scanner would cross the rings whatever the angle of approach. They filed in 1949 and the patent was granted in 1952.

Then nothing happened for twenty years. The idea was sound and the technology was not: reading it needed a bright, tightly focused light source and enough computing to interpret the reflection, and neither was affordable. The patent expired before it earned anyone much of anything.

1974: the reader catches up

What unlocked barcodes was not a better symbol but the laser, plus cheap integrated circuits. When the grocery industry finally standardised, it picked a rectangular linear symbol over Woodland's bullseye — easier to print consistently on a press, and by then scanners could handle orientation. In June 1974 a ten-pack of Wrigley's Juicy Fruit went across a scanner in a supermarket in Troy, Ohio, as the first commercial UPC scan.

That made barcodes infrastructure. It also fixed their ceiling in place: a linear symbol encodes along one axis only, so capacity buys you width, and width is the one thing a product label does not have spare.

1980s-early 1990s: escaping one dimension

Two approaches emerged. Stacked symbologies — Code 49, and later PDF417 — took the linear barcode and piled several short rows on top of each other. More capacity, still fundamentally a barcode, still read by sweeping.

Matrix codes, Data Matrix chief among them, went further and abandoned rows entirely: data became a genuine two-dimensional grid of cells, read as an image rather than swept as a line. Capacity stopped being a constraint worth worrying about.

Which left exactly one problem, and it is the problem the next section is about. A grid holds plenty. Finding it, fast, in a camera frame that also contains a box, a hand, a conveyor and a fluorescent light — that nobody had solved.

The problem on the factory floor

By the early 1990s, Japanese automotive manufacturing had adopted barcodes thoroughly, and had run straight into the ceiling described above. Tracking a component through production needed far more than one linear symbol could hold — part number, batch, destination, process stage — so boxes ended up carrying several barcodes each, and workers scanned them one at a time.

Masahiro Hara, an engineer at Denso Wave (a Denso subsidiary within the Toyota Group), was hearing this complaint directly from the people doing the scanning. The request was blunt: a code that holds more, and reads faster.

The capacity half of the request already had an answer, and Hara knew it: the 2D symbologies above encode across both axes and have headroom to spare. The hard part was speed. Those codes were slow to locate in an image, because a scanner had to work out where in the frame the code sat and which way round it was before it could read a single cell. In a warehouse that is a mild annoyance. On a moving production line it was the entire problem.

The insight: make the code easy to find

Hara's team concentrated on the location problem rather than the encoding one, and the answer became the three nested squares in the corners of every QR code — the finder patterns.

The design has a property that makes detection cheap. Scan a straight line through the centre of a finder pattern from any direction and the alternating dark and light runs always come out in the same 1:1:3:1:1 ratio. A scanner doesn't need to know the code's size, position or rotation; it can sweep the image looking for that one signature, and finding three of them establishes the code's boundaries and orientation in a single step.

An enlarged finder pattern with a scan line crossing its middle row, and measurement brackets showing run lengths in a 1 to 1 to 3 to 1 to 1 ratio.
The ratio that made QR codes fast. Scale-invariant and rotation-invariant, so a scanner can hunt for it without any prior knowledge of the code.

Two origin stories attach to this design, and both appear to be true. Hara has said in interviews that he played Go at lunchtime, and that looking at the board — black and white stones on a grid — helped him see the code as a two-dimensional arrangement of cells rather than as an image.

The more rigorous half was empirical. The 1:1:3:1:1 ratio had to be a pattern that essentially never occurs by accident, or scanners would keep locking onto ordinary printed matter and hunting for a code that wasn't there. So the team surveyed a large body of printed material — leaflets, magazines, boxes, forms — analysing the distribution of black-and-white run lengths to find the ratio that appeared least often. That's engineering, not inspiration, and it's the reason the format works reliably in cluttered real-world scenes.

The name came from the original goal. Quick Response: the code had to be readable at production-line speed.

The decision that made it universal

Denso Wave patented the QR code. It then declared that it would not exercise its patent rights against anyone using the standardised specification, and published the format openly.

This is the most consequential thing in the format's history, and it's worth sitting with. Denso Wave gave up the licensing revenue from a technology that ended up on virtually every product, menu, ticket and payment terminal on earth. The reasoning was that a proprietary code nobody could implement freely would stay a Denso tool, whereas an open one might become infrastructure. The company's return would come from selling the scanning hardware and from its own supply chain running on a standard everyone else supported too.

It worked. Formal standardisation followed: an AIM International standard in 1997, a Japanese Industrial Standard in 1999, and ISO/IEC 18004 in 2000, which remains the governing specification through subsequent revisions.

What this means for you

Generating, printing and scanning QR codes is free, including commercially. Nobody owes anyone a licence fee for the format. Where money changes hands it's for a service around the code — dynamic redirects, hosting, analytics, design tooling — never for the code itself. Any product implying otherwise is selling you something you already have.

From factory to phone

QR codes spread through Japanese industry through the late 1990s, then reached Japanese consumers earlier than anywhere else — Japanese mobile phones were shipping with built-in scanners in the early 2000s, and codes turned up on business cards, adverts and packaging well before Western audiences had a way to read them.

Elsewhere, adoption stalled for a decade on one obstacle: you needed to install an app. That extra step was fatal. A poster asking someone to download a scanner app first, then come back and scan, lost almost everyone, and QR codes acquired a reputation as a gimmick that never quite worked. That reputation was earned, and it was about distribution rather than the technology.

The obstacle disappeared when phones started scanning natively. Apple added QR recognition to the iPhone Camera app in iOS 11 in 2017; Android arrived at the same place through Google Lens and stock camera integration around the same period. From that point, scanning a code required no preparation at all.

Then came 2020. Contactless everything — restaurant menus, check-ins, ticketing, health passes — pushed QR codes into daily use for a mass audience almost overnight, at exactly the moment every phone could finally read them without help. The format hadn't changed since 1994. Everything around it had.

What the original design got right

What's striking about the 1994 specification is how little has needed changing. A QR code generated today is read by the same rules Hara's team wrote for scanning car parts, and several decisions made for factory conditions turned out to matter far more in consumer use than they did on a production line:

  • Error correction up to ~30%. Intended for oily, scuffed, poorly printed factory labels. It's the reason you can put a logo in the middle of a code, which nobody in 1994 was thinking about.
  • Rotation invariance. Intended so line workers didn't have to align a scanner. It's the reason pointing a phone casually at a code works at all.
  • Alignment patterns. Intended for labels on curved parts. They're why a code on a drinks bottle or photographed at an angle still reads.
  • Massive headroom in capacity. 40 versions were far beyond anything the original use case needed, which left room for payloads — vCards, Wi-Fi credentials, calendar events — that didn't exist yet.

The main additions since have been narrower variants rather than changes to the core: Micro QR for very small components, and later extensions such as rMQR for narrow rectangular spaces. Standard QR codes work exactly as originally specified.

For how that structure actually functions, see how QR codes work.

Frequently asked questions

Who invented the QR code?

Masahiro Hara, leading a small team at Denso Wave — a subsidiary of Denso, part of the Toyota Group — released the format in 1994. Hara has consistently described it as a team effort rather than a solo invention, and has said he was surprised by its eventual consumer use, having designed it purely for manufacturing.

Why is it called a QR code?

QR stands for "Quick Response." The design goal wasn't capacity alone — 2D codes with high capacity already existed — but the speed of locating and reading a code, since the original users were scanning components moving through a production line. The finder patterns exist specifically to make that step fast.

Is the QR code patented? Do I have to pay to use one?

Denso Wave holds patents on the format but declared from the beginning that it would not exercise them against users of the standardised specification, which is published as the open ISO/IEC 18004 standard. Generating, printing and scanning QR codes is free for anyone, commercial use included. Charges you encounter are for services built around codes — dynamic redirects, analytics, hosting — not for the format.

Did the game of Go really inspire the QR code?

Partly, and the story is usually told with more romance than it deserves. Hara has described playing Go at lunch and the board helping him think about data as a grid of black and white cells. But the finder pattern's specific 1:1:3:1:1 ratio came from a systematic survey of printed material to identify the run-length ratio that occurs least often in ordinary print — so it wouldn't trigger false detections. The Go board shaped the concept; the analysis produced the design.

Why did QR codes take so long to catch on outside Japan?

Because scanning required installing an app. Japanese phones shipped with built-in scanners in the early 2000s, so codes were immediately useful there. Everywhere else, a code asked the viewer to download something first — and most people didn't. Native camera scanning arriving around 2017, followed by the contactless shift of 2020, removed that barrier and adoption followed almost immediately.