Skip to content
RelyQr

How QR codes work

By Prabhneet Singh Narula, founder of RelyQr · Updated

Short answer

A QR code stores information in a grid of black and white squares called modules. Three large squares in the corners tell a phone's camera where the code is and which way up it is; the rest holds the data and extra error-correction data, so the code still scans when part of it is damaged or covered by a logo.

Who invented the QR code

The QR code (Quick Response code) was invented in 1994 by a team led by Masahiro Hara at Denso Wave, a Toyota group company, to track car parts faster than linear barcodes allowed. It's an international standard, ISO/IEC 18004, and free for anyone to use: Denso Wave holds the patent but chose not to enforce it for the standard code.

The parts of a QR code

  • Finder patterns: the three large squares in the corners, which let a camera find the code from any angle.
  • Timing patterns: rows of alternating modules between the finder patterns, which set the grid size.
  • Alignment patterns: smaller squares, from version 2 up, which correct for curved or angled codes.
  • Format information: the error-correction level and the mask pattern used to keep the grid easy to read.
  • Data and error-correction modules: everything else, holding the content and the extra data that repairs damage.
  • The quiet zone: a clear margin four modules wide on every side, without which cameras can't tell where the code starts.

Versions, size and how much fits

QR codes come in 40 versions. Version 1 is 21 × 21 modules and each version adds four modules per side, up to 177 × 177 for version 40. The more you store, the higher the version and the denser the pattern, which is why short content prints well small.

ContentVersion 1 (21 × 21), low correctionVersion 40 (177 × 177), low correction
Digits only417,089
Capital letters, digits and a few symbols254,296
Any text (bytes)172,953
Kanji101,817

Error correction

Every QR code carries extra error-correction data at one of four levels: L recovers about 7% of the code, M 15%, Q 25% and H 30%. Higher levels survive more damage, or a logo in the middle, at the cost of a denser pattern. Adding a logo works because of it.

Static and dynamic QR codes

A static QR code holds its content, like a web address or Wi-Fi details, in the pattern itself. A dynamic QR code holds a short link that forwards to the content, so the destination can change after printing and every scan can be counted. Read static vs dynamic QR codes for when to use each.

All guides

Static and dynamic codes

Expiry and fixes

Design and print

Making codes and staying safe

Make a QR code that lasts forever

Free static codes with your logo and no watermark, and dynamic codes that keep working on every plan.

Free QR code generator

QR Code is a registered trademark of DENSO WAVE INCORPORATED.