Tools
EN

What Is a QR Code?

A QR code is a square barcode that a phone can read in a fraction of a second. This guide explains what QR stands for, how the black and white squares store data, how much fits into one code, why static codes never expire and how to scan QR codes safely.

What does QR code stand for?

QR stands for Quick Response. The QR code was invented in 1994 by Masahiro Hara at Denso Wave, a Toyota group company, to track car parts on the production line – it had to be read much faster than the barcodes of the time, from any direction. Unlike a classic barcode, which stores data in one direction only, a QR code is a two-dimensional matrix code. It is standardized as ISO/IEC 18004.

How a QR code works

Every QR code is a grid of small squares called modules; each dark or light module is one bit. Besides the data, the grid contains fixed patterns that help the scanner:

There are 40 versions: version 1 has 21 × 21 modules, and each version adds 4 modules per side, up to 177 × 177 in version 40. A mask – one of eight patterns – is applied to the data so that no large single-colored areas confuse the scanner.

Error correction levels

QR codes use Reed-Solomon error correction, so a code can still be read when part of it is dirty, damaged or covered by a logo. The level is chosen when the code is created:

LevelRestores aboutTypical use
L (low)7 % of the codewordsClean environments, the most data in the smallest code
M (medium)15 %The usual choice for print and screens
Q (quartile)25 %Industrial labels, outdoor use
H (high)30 %Codes with a logo or exposed to heavy wear

A higher level needs more modules for the same content, so the code gets denser or larger.

How much data fits into a QR code?

The capacity depends on the version, the error correction level and the kind of data. The largest code, version 40, holds:

DataLevel LLevel H
Digits only7,0893,057
Upper-case letters, digits and $%*+-./: and space4,2961,852
Bytes (any text as UTF-8)2,9531,273
Kanji characters1,817784

In English text one character is one byte; accented letters take two bytes and emoji four. In practice, short is better: a 100-character link fits into a version 6 code (41 × 41 modules) at level M and scans easily, while a code near the maximum is hard to read with a phone.

Static vs. dynamic QR codes

A static QR code contains the content itself – the link, the Wi-Fi password or the contact details. It needs no server, so it never expires, cannot be switched off and works for as long as the content is valid. A dynamic QR code contains only a short link to a provider's server, which forwards to the real destination. That allows changing the target and counting scans, but every scan depends on the provider: if the subscription ends or the company closes, the code stops working. Codes that “expired” after a free trial are almost always dynamic codes.

How to scan a QR code

QR code safety: how to avoid “quishing”

A QR code is just text, but the link inside can lead to a fake website. Phishing with QR codes – “quishing” – uses stickers on parking meters and charging stations, fake parking tickets or emails that ask you to scan a code urgently.

Where QR codes are used

Frequently asked questions

Do QR codes expire?

Static QR codes never expire, because the content is stored in the code itself. Dynamic codes from subscription services stop working when the service is ended.

Can a QR code contain a virus?

A QR code only contains text, such as a link. It cannot run anything by itself, but the link can lead to a phishing site or a harmful download – so check the address before you open it.

Are QR codes free to use?

Yes. Denso Wave, which invented the QR code, does not exercise its patent rights, and the format is an open ISO standard. “QR Code” is a registered trademark of DENSO WAVE INCORPORATED.

Updated: