# Why QR codes are square

> QR codes are square because the format is a matrix symbology, storing data on a fixed square grid the decoder addresses in two dimensions. Three corner finder patterns define position, rotation and perspective, and timing patterns set the grid pitch. Rectangular variants exist (rMQR), but standard QR stays square.

Source: https://useqr.app/docs/spec/why-qr-codes-are-square · Last reviewed 2026-08-21 · UseQR is free forever, no signup.

---

## A matrix needs addresses

A QR code is a **matrix symbology**: every module is a cell at a (row, column) address in a
grid, unlike a linear barcode, which is a one-dimensional sequence of bar widths. To read a
matrix from a photograph, the decoder must reconstruct that grid, work out exactly where
each cell centre sits in the image, despite the photo being rotated, tilted and
perspective-distorted.

The square shape is what makes that reconstruction cheap and unambiguous.

## Three corners define the plane

The [finder patterns](/docs/spec/finder-patterns) in three corners are the key. Three known
points are the minimum needed to recover position, rotation, scale and skew. They fix an
affine mapping from grid coordinates to image coordinates. The fourth corner is deliberately
left empty: the asymmetry is what tells the decoder which way up the code is. Three finders
in a square arrangement can only match one orientation, which is why a QR code scans
identically at 0°, 90°, 180° and 270°.

For larger versions, where paper curl and lens distortion bend the grid between the corners,
[alignment patterns](/docs/spec/alignment-patterns) pepper the interior as additional
reference points, and the alternating [timing patterns](/docs/spec/timing-patterns) running
between the finders let the decoder count rows and columns and lock the module pitch.

A square grid also makes the version self-describing: every QR version is
**17 + 4 × version** modules per side, so measuring one side in modules identifies the
version: a 29-module side can only be version 3. On a rectangle, side length alone would
be ambiguous without extra signalling.

## The rectangular exceptions

Square is a design choice, not a law of nature, and the QR family itself contains
exceptions:

- **[Micro QR](/docs/basics/micro-qr-code)** is still square but uses a single finder
  pattern to save space, at the cost of needing cleaner captures.
- **[rMQR](/docs/basics/rmqr-rectangular-micro-qr)** (rectangular Micro QR, standardised as
  ISO/IEC 23941) is exactly what it sounds like, QR technology in strips from 7 to 17
  modules tall, built for narrow spaces like test-tube labels and cable flags, using a
  finder in one corner and a sub-finder in the opposite one.
- **[Data Matrix](/docs/basics/qr-code-vs-datamatrix)**, a different symbology entirely,
  supports rectangular formats natively and uses an L-shaped solid border instead of corner
  finders.

The catch is decoder support: every phone camera app reads standard QR; rMQR and
rectangular Data Matrix generally need dedicated scanning software. For anything consumers
scan, the square symbol wins on compatibility, not geometry.

## What squareness does not require

The *symbol* is square; the *artwork* need not look it. Modules can be rendered as dots,
the code can sit inside a circular badge, and frames can be any shape, as long as the
underlying grid, the finder geometry and the [quiet zone](/glossary/quiet-zone) survive.
Where the line falls between styling and breakage is covered in
[can a QR code be round](/docs/spec/can-a-qr-code-be-round). Whatever the styling, confirm
the result still reads with [/validate](/validate).

## FAQ

### Why do QR codes have three squares in the corners?
They are finder patterns. Three known reference points let the decoder recover the code's position, rotation, scale and tilt from a photo, and the deliberately empty fourth corner reveals the orientation, so codes scan correctly from any angle.

### Are there rectangular QR codes?
Yes: rMQR (rectangular Micro QR, ISO/IEC 23941) comes in strips from 7 to 17 modules tall for narrow spaces. Phone camera apps mostly do not read it yet, so it suits industrial scanners rather than consumer use.

### Does a QR code have to be a perfect square?
The module grid does, decoders reconstruct a square lattice from the finder geometry. Printing that stretches the code into a rectangle distorts module spacing and can break scanning, which is why design tools should scale QR codes proportionally only.

### Why is one corner of a QR code empty?
Orientation. With finders in only three corners, the pattern matches exactly one rotation, so the decoder knows which way up the symbol is. The empty corner's area is used for data and, in larger versions, an alignment pattern.

## Try it

- https://useqr.app/url
- https://useqr.app/validate
- https://useqr.app/scan
