CodeBox Hub
FREE

What Is a QR Code?

A QR code is a 2D matrix barcode defined by ISO/IEC 18004 that stores URLs, text, WiFi credentials and contacts in a scannable grid of modules.

# What Is a QR Code?

A QR code (Quick Response code) is a two-dimensional matrix barcode: a square grid of black and white modules that encodes data in both directions at once. Defined by the ISO/IEC 18004 standard, it can hold anything from a phone number to a 2,000+ byte payload, and any smartphone camera can read it without a dedicated app.

Anatomy: the parts inside the grid

Unlike a one-dimensional barcode, which a reader sweeps across in a single line, a QR code is captured as one image and read all at once. Fixed patterns let the camera orient itself before decoding. According to the ISO/IEC 18004 specification and Wikipedia, the grid contains these components:

ComponentPositionRole
Finder patternThree 7×7 squares in the top-left, top-right and bottom-left cornersThe camera locks onto them to find the symbol and its orientation
Timing patternRow and column 6, between the findersAlternating modules that set the grid spacing
Alignment patternOne 5×5 grid in versions 2-6, five in versions 7-40Keeps decoding accurate when the symbol is rotated or skewed
Format information15 bits around each finderTells the reader the error-correction level and mask pattern
Version informationTwo small blocks, versions 7 and up18 bits identifying which of the 40 versions is in use
Data modulesAll remaining cellsThe payload itself, protected by Reed-Solomon error correction
Quiet zoneBorder outside the gridA four-module margin, required by ISO/IEC 18004

Forty versions, one formula

The symbol comes in 40 versions. Version 1 is a 21×21 grid; each step adds four modules per side, so version v measures 4v + 17 modules, up to 177×177 at version 40. Bigger versions hold more data but need more print space, which is why choosing the smallest version that fits your payload matters (see minimum QR code size).

VersionGridByte capacity L / M / Q / H
121×2117 / 14 / 11 / 7
537×37106 / 84 / 60 / 44
1057×57271 / 213 / 151 / 119
2097×97858 / 666 / 482 / 382
40177×1772953 / 2331 / 1663 / 1273

These byte-mode values come from ISO/IEC 18004 and we re-verified them by generating every version in our tool. In that same run, a five-character text payload fit in version 1 at every error level, while a 245-byte vCard jumped to version 11 at level M and version 16 at level H — 33% more modules for the identical data. The complete numeric and alphanumeric matrix for versions 1-10 is on the QR code capacity page.

Four ways to encode the same data

ISO/IEC 18004 defines four encoding modes, and a smart encoder picks the densest one automatically:

  • Numeric (0-9): three digits per 10 bits — a 12-digit order number uses about 60% fewer bits than the same digits stored as text.
  • Alphanumeric (0-9, A-Z, space and a few symbols): two characters per 11 bits.
  • Byte: one byte per 8 bits; this is what URLs and most real-world content use.
  • Kanji: one Shift-JIS character per 8 bits, designed for Japanese labels.

Mixed content is allowed: the encoder splits the payload into segments and writes each part in its best mode. That is exactly what the QR code generator does under the hood.

What a QR code can store

The payload is just a string, so the "type" of code is decided by its format:

Content typePayload formatWhere to generate it
Web addresshttps://example.com/pageURL QR
WiFi networkWIFI:T:WPA;S:MyNet;P:Secret123;;WiFi QR
Contact cardBEGIN:VCARD … END:VCARDvCard QR
Bank transferBCDC + ISO 20022 fieldsSEPA QR
Phone, SMS, email, event, locationtel: / sms: / mailto: / BEGIN:VEVENT / geo:Any type in the QR generator

QR code vs one-dimensional barcode

QR codes and 1D barcodes (Code 128, EAN-13, UPC-A) solve the same problem — machine-readable data — with very different geometry. The table below compresses the comparison to twelve dimensions; the full analysis with a buying guide is on QR code vs barcode.

#DimensionQR code1D barcode
1Encoding2D matrix, reads horizontally and verticallyBars in one direction
2Max payload2,953 bytes (version 40, level L)about 48 characters (Code 128)
3OrientationScannable at any rotationMust be aligned left to right
4Error correction7-30% recovery, four levelsNone built in
5Data typesURLs, vCards, WiFi, email, numbersMostly digits and letters
6Human readabilityNo readable textMany symbologies print readable digits
7Scanner neededAny phone cameraDedicated laser/CCD scanner or app
8Print size for the same dataLarger — more modules per byteMore compact per character
9StandardISO/IEC 18004Per symbology (ISO/IEC 15417, GS1 standards)
10Typical jobPayments, marketing, logistics labelsRetail point of sale, shipping
11Damage toleranceRecovers from scratches and occlusionFails when a single bar is damaged
12Origin1994, DENSO WAVE, Japan1974, first retail barcode in the US

How scanning actually works

  1. A camera — built-in or the online QR scanner — captures the symbol.
  2. Detection finds the three finder patterns and estimates rotation and perspective.
  3. Decoding reads the grid, reverses the mask, and Reed-Solomon correction repairs any damaged modules.

A healthy code decodes in well under a second on a recent phone. For codes that must survive outdoors, curved surfaces or logos on top, generate at error-correction level H and use the QR beautifier to keep the design clean while the correction level does the heavy lifting. If you have hundreds of codes to produce at once, the batch QR generator runs the same encoders row by row.

How long does a QR code last?

A static QR code has no expiry: the data is printed into the modules, so the code outlives any service. A dynamic QR code points at a short link managed by a provider and lasts as long as that service runs. If the destination will change later — a new landing page, a rotated WiFi password — dynamic is the right choice; for anything fixed for life, static is free and permanent.

FAQ

What does QR stand for?

QR stands for Quick Response. The name reflects the original 1994 design goal at DENSO WAVE: a reader should decode the symbol instantly, without sweeping it slowly across bars.

Who invented the QR code?

Masahiro Harada at DENSO WAVE, a Toyota supplier in Japan, in 1994, to track automotive parts on the factory floor. The full timeline is on the QR code history page.

How much data can a QR code hold?

From 7 bytes in a version 1 code at level H up to 2,953 bytes in a version 40 code at level L in byte mode, or 7,089 digits in numeric mode at the same version.

What is the difference between a QR code and a barcode?

A barcode encodes in one direction and holds tens of characters at most; a QR code is a two-dimensional matrix that holds up to 2,953 bytes, scans at any angle, and repairs damaged modules with built-in error correction.

What are the three squares in the corners of a QR code?

They are finder patterns, 7×7 module squares that let the camera locate the symbol, measure its rotation, and set the grid spacing before reading the data modules.

Can every phone camera scan QR codes?

All iPhones since iOS 11 and most Android phones since 2014 scan QR codes natively; older phones can use the QR scanner in the browser instead.

How small can a QR code be printed?

Keep each module at least 0.3 mm and add a four-module quiet zone; that puts a version 1 code at roughly 9 mm total, though 1.5-2 cm prints scan most reliably.

Can a QR code store a video or a file?

Not directly. A QR code stores text, so a "video QR" stores the URL of the video and a "file QR" stores a download link — 2,953 bytes is the absolute maximum.

Keep reading

Contact us