QR code

Also called: Quick Response code, QR, 2D code

Definition

A QR code is a two-dimensional matrix barcode that stores data in a square grid of dark and light modules. DENSO WAVE invented it in 1994, and phone cameras and imaging scanners can read it.

What a QR code is

A QR code is a two-dimensional barcode that stores information in both directions, horizontally and vertically, instead of in a single row of bars. The name stands for Quick Response, because the code was designed to be read fast. DENSO WAVE, a Toyota group company, developed it in 1994 to track automotive parts on production lines.

Today most QR codes hold a web address, but the same symbol can carry plain text, contact cards, Wi-Fi settings, payment requests and ticket data. Any modern smartphone camera can read one, which is why QR codes spread far beyond factories to menus, posters, packaging and payments.

How a QR code is built

A QR code is a square grid of small cells called modules, each dark or light. Fixed patterns help a scanner find and straighten the code, and the remaining modules carry the data and error correction. A blank margin called the quiet zone surrounds the whole symbol so the scanner can tell where it starts.

  • Finder patterns: three large squares in the corners that let a scanner locate the code and its orientation
  • Alignment patterns: smaller squares that help correct for perspective and curvature (version 2 and up)
  • Timing patterns: alternating dark and light lines that fix the grid spacing
  • Format information: records the error correction level and mask pattern
  • Version information: records the size, present from version 7 up
  • Quiet zone: four modules of clear space on every side

Versions, capacity and error correction

QR codes come in 40 sizes called versions. Version 1 is 21 by 21 modules, each version adds 4 modules per side, and version 40 is 177 by 177 modules. More data needs a higher version, which means more and smaller modules at the same printed size.

Every QR code also uses one of four error correction levels, which lets it be read even when part of it is dirty, damaged or covered. The level trades capacity for resilience: a higher level stores less data but survives more damage.

  • Level L recovers about 7% of codewords
  • Level M recovers about 15%
  • Level Q recovers about 25%
  • Level H recovers about 30%
  • Largest capacity (version 40, level L): 7,089 numeric digits, 4,296 alphanumeric characters, 2,953 bytes or 1,817 kanji

Where QR codes are used

QR codes are used wherever a printed or on-screen surface needs to hand something to a phone. Common uses include links on posters and business cards, restaurant menus, Wi-Fi sign-in, event tickets, boarding passes, product packaging and merchant payments. In several countries, national payment schemes are built on QR codes.

A QR code can be static, with the final data encoded directly, or dynamic, with a short redirect link that can be changed later and counted. QR Code is a registered trademark of DENSO WAVE INCORPORATED.

Frequently asked questions

What does QR stand for in QR code?

QR stands for Quick Response. DENSO WAVE chose the name because the code was designed to be decoded quickly.

Who invented the QR code?

The QR code was invented in 1994 at DENSO WAVE, then part of the Toyota group company DENSO, by a team led by Masahiro Hara.

Can a QR code still work if part of it is damaged?

Yes, within limits. Error correction lets a QR code be read with about 7% to 30% of its codewords damaged, depending on the level chosen when it was made.

Do QR codes expire?

A static QR code never expires because the data is printed in the code itself. A dynamic QR code stops working if the redirect service behind it is switched off.

Sources and standards

All terms