Give your QR code enough clear space

The plain margin around a QR code is part of the code. Scanners use it to find where the symbol starts, and when a layout eats into it, a perfectly good code can stop reading.

The four-module rule

A QR code needs a margin of at least four modules on every side, where a module is one of the small squares that make up the code. DENSO WAVE, which invented the QR code, states this in its guidance on printing QR codes, and it's part of the symbol specification in ISO/IEC 18004. The margin is usually called the quiet zone. It must be the same light color as the code's background, with nothing printed in it. (Micro QR, a smaller variant you're unlikely to meet in everyday use, needs only two modules.)

Because it's measured in modules, the quiet zone scales with the code. On a 25-module code printed 33 mm wide including the margin, four modules is 4 mm. On the same code printed on a 330 mm poster, it's 40 mm.

4
SafeA version 2 code with the full four-module quiet zone marked by the dashed line. Nothing intrudes on it.

Why scanners need it

A decoder starts by hunting for the three finder patterns, the big squares in the corners. Each one has a distinctive light and dark sequence across it, in the ratio 1:1:3:1:1. The scanner looks for that ratio along lines of the image. The quiet zone guarantees the pattern begins and ends cleanly. If a dark border, a line of text or a busy photo runs right up to the finder, the sequence the scanner sees no longer matches, and it can miss the finder or misjudge where the symbol's edge is. Once the edge is wrong, the module grid is wrong, and the decode fails.

Some decoders cope with a smaller margin, especially when the code fills the camera view. That's luck, not design. Keep four modules and you never have to find out which scanners are forgiving.

What breaks the quiet zone

UnsafeA patterned background runs right up to the modules. The scanner can't tell where the code ends.
UnsafeA decorative border one module from the code. Its dark line reads like part of a finder pattern.

Busy backgrounds

Placing a code straight onto a photo, a pattern or a textured background is the most common failure. Put the code on a light, plain panel, and make the panel at least four modules bigger than the code on every side.

Frames and borders

A box or rule drawn tight around the code is a dark edge inside the quiet zone. "Scan me" frames are fine, provided the frame sits outside the margin. Our generator's frames do this automatically: the frame's window is the code plus its full quiet zone.

Text and logos nearby

Captions, phone numbers or icons set close to a code count as intrusions. Keep them at least four modules away, or more for comfort.

Cropping and trimming

A designer cropping a PNG to "remove the white border" deletes the quiet zone. So does a print layout that places a code against the trimmed edge of a card or label. Both are easy to miss because the code still looks complete.

Bleed, trim and safe areas

SafePink: bleed beyond the trim line. Solid line: trim. Blue dashed: the printer's safe area. The code and its full quiet zone (magenta dashes) sit inside the safe area.

Print jobs have three boundaries:

  • Trim: where the sheet is cut to its final size.
  • Bleed: artwork extended past the trim, commonly 3 mm or ⅛ inch, so backgrounds run to the edge even when the cut drifts slightly.
  • Safe area: a margin inside the trim, often 3 to 5 mm, where important content is protected from cutting tolerance.

The whole quiet zone, not just the code, belongs inside the safe area. Never let the quiet zone depend on paper that might be trimmed off. On a business card that's 55 mm tall, a 20 mm code plus a safe margin leaves little room to spare, so place it deliberately (seeQR codes on business cards).

If the background color runs to the bleed and the code sits on a white plate, make the plate cover the code plus four modules. Our PDF export can add a 3 mm bleed and crop marks around the code if you're placing it as a standalone piece.

Frames placed outside the margin

SafeA frame drawn around the code and its full quiet zone. The dashed line stays clear.

A frame with a call to action ("View menu", "Join Wi-Fi") helps people know what a code does and makes them more willing to scan it. Treat the code plus its quiet zone as one block, and draw the frame around that block. The frame's color can be anything, since it's outside the symbol, but avoid patterns or text that creep inwards.

A practical checklist

  • Four modules of plain, light background on all four sides, on the final artwork, not just in the file.
  • Frames, borders, text and logos outside that margin.
  • The code and margin inside the printer's safe area, away from the trim.
  • Don't crop exported files. If you need a smaller file, make the code smaller.
  • Scan a proof of the full layout with the readability checker or several phones. Seehow to test a QR code.