Guide

The QR code quiet zone

The quiet zone is the empty margin around a QR code. It shows the scanner where the code ends and the background begins. The QR code standard asks for a margin four modules wide on every side, where a module is one of the code's small squares. Nothing may be printed inside it.

Four modules, by the book

Denso Wave, which invented the QR code, puts it plainly: "QR Code requires a four-module wide margin at all sides of a symbol" (Denso Wave). The standard, ISO/IEC 18004, says the same. A module is one of the code's small squares, so the margin scales with the code.

Denso Wave's own worked example: a version 3 code is 29 modules across. Printed with 0.254 mm modules, the code is 7.37 mm wide, and adding four modules on each side brings the printed square to 9.40 mm.

CodeGridGrid plus a 4-module margin
Version 121 × 2129 × 29
Version 329 × 2937 × 37
Version 537 × 3745 × 45
Version 1057 × 5765 × 65

Why our downloads use two

Our SVG and PNG files include a margin two modules wide, not four. Two scans fine on phones and screens. For print, the other two modules are yours to add when you place the file.

We checked how much margin a decoder needs in the easiest possible case. We took a 30-character link, drew it on a clean image, surrounded it with a field of random dark and light squares (and, separately, a solid black frame), and varied the gap. jsQR, the decoder behind our online scanner, read the code with a gap of one module and failed with none.

So four modules isn't the bare minimum for a sharp digital image. It's the margin for print: ink spreads, cameras blur, and a phone held at an angle sees the border shrink. If the code sits next to text, a photo or the edge of a design, add space when you place it until the blank border is four modules wide.

Measuring it on your own design

  1. Measure one of the big corner squares. It's always 7 modules wide.
  2. Divide by 7. That's one module.
  3. Multiply by 4. That's the clear space you want on every side.

A version 3 code printed 3 cm wide has modules a little over 1 mm, so it wants about 4 mm of clear space all round. The size calculator includes the four-module border in the total it gives you.

How designs lose it

  • The image gets cropped tight in a design tool to "tidy it up".
  • The code goes straight onto a photo or pattern with no plain box behind it.
  • A frame or a label like "Scan for the menu" touches the code's edge.
  • It sits near the edge of a card, where the cutter can shave off a millimetre.

It doesn't have to be white

The margin has to match the code's light color and be empty. A navy code on pale yellow needs a pale yellow margin. More on choosing that pair in colors and contrast.

Micro QR codes are the exception to the four-module rule: Denso Wave says two modules is enough for them.

Written by Last updated