Free QR Gen LogoCreate a QR code

What is a QR code?

The little black-and-white squares are everywhere, from restaurant menus to train tickets. Here is where they came from, how they work and how to make one that scans every time.

What a QR code is

A QR code is a two-dimensional barcode. "QR" stands for Quick Response, because it was designed to be read fast. A traditional barcode stores information in one direction, as a row of lines. A QR code stores it both horizontally and vertically in a grid of small squares called modules, so it can hold far more data in the same space.

Point a phone camera at one and it decodes the pattern into text, most often a web address, but it can also hold contact details, Wi-Fi credentials or plain text.

Who invented the QR code?

The QR code was invented by Masahiro Hara, a Japanese engineer who led the development team at Denso Wave, then part of Denso, a Toyota Group company. It was released in 1994.

The problem was on the factory floor. Car parts were tracked with barcodes, and a single box of components could carry around ten of them, each scanned one by one. Barcodes also held only about 20 characters and could not store Japanese Kanji and Kana characters. Hara's team set out to build a code that held much more data and could be read much faster.

Hara has said the idea came to him while playing the board game Go, where black and white stones sit on a grid. That grid of black and white became the basis of the QR code. The result held around 7,000 numbers, could store Kanji, and could be read more than ten times faster than other codes.

One clever detail is the three large squares in the corners, called finder patterns. They let a scanner find the code and work out its angle from any direction. To make sure nothing else would be mistaken for them, the team surveyed a wide range of printed materials to find the black-and-white ratio least likely to appear by chance. They settled on 1:1:3:1:1.

Denso Wave holds the patent but chose not to enforce it, and published the specification so anyone could use QR codes free of charge. That decision is a big part of why QR codes are everywhere today, including on free tools like this one.

A short timeline

  1. 1994Denso Wave announces the QR code.
  2. 1997Approved as an AIM (Automatic Identification Manufacturers) standard.
  3. 1999Becomes a Japanese Industrial Standard (JIS).
  4. 2000Approved as an international standard, ISO/IEC 18004.
  5. 2002Mobile phones with built-in QR readers go on sale in Japan.
  6. 2014The QR code team wins the European Inventor Award Popular Prize.
  7. 2017Apple's iOS 11 lets the iPhone camera scan QR codes directly.
  8. 2020The COVID-19 pandemic brings QR menus and check-ins to everyday life.

Denso Wave has also created variations such as Micro QR for very small spaces, iQR for rectangular codes, and Frame QR, which leaves room for an image in the middle.

How QR codes work

Every QR code is built from a few parts that tell the scanner how to read it:

  • Finder patterns: the three large squares in the corners, used to locate and orient the code.
  • Alignment patterns: smaller squares that help correct for distortion when a code is printed on a curved surface or scanned at an angle.
  • Timing patterns: alternating lines of modules that help the scanner work out the size of the grid.
  • Quiet zone: the empty margin around the code that separates it from its surroundings.
  • Data and error correction: the rest of the grid, holding your content plus extra recovery data.

Sizes and capacity

QR codes come in 40 "versions". Version 1 is a 21 x 21 grid of modules and version 40 is 177 x 177. The largest codes can hold up to 7,089 numbers or 4,296 letters and numbers. The more data you put in, the denser the grid, which is why short links make cleaner codes.

Error correction

QR codes use Reed–Solomon error correction, so they can still be read when part of the code is dirty, damaged or covered. There are four levels:

  • L (Low): about 7% of the code can be restored
  • M (Medium): about 15%
  • Q (Quartile): about 25%
  • H (High): about 30%

That spare capacity is also what lets you place a logo in the middle of a QR code: the logo covers some modules, and error correction fills in the gaps. You can pick the level when you create your QR code.

Tips for QR codes that scan reliably

  • Keep strong contrast. A dark code on a light background is the safest choice. Some scanners struggle with light codes on dark backgrounds.
  • Leave a margin. Don't crop the quiet zone or place text right up against the code.
  • Use higher error correction with a logo. Q or H gives the scanner more room to recover the modules your logo covers.
  • Don't make the logo too big. If it covers too much of the code, it won't scan, whatever the error correction level.
  • Print it big enough. Make the code larger when people will scan it from further away, such as on a poster.
  • Test before you print. Scan it with a couple of different phones first.

Making one for a café or restaurant? Follow our step-by-step guide to making a QR code for your restaurant menu.

Where to read and watch more

Ready to make your own? Create a free QR code →

QR Code is a registered trademark of DENSO WAVE INCORPORATED.