· 7 min read

How to Design a Custom QR Code That Still Scans

A custom QR code can carry your colors, your logo and your style. It can also fail to scan, and a code that does not scan is worse than no code at all.

The good news is that scanners are forgiving if you respect a handful of rules. This guide walks through each design choice and shows how far you can push it.

Know the parts you cannot break

The three big squares in the corners are finder patterns. The scanner uses them to locate the code and work out its orientation, so they must stay clearly visible and clearly square-ish in outline. You can round them or recolor them, but never cover them.

The empty border around the code is called the quiet zone. It separates the code from whatever surrounds it. The standard asks for a margin four modules wide, where a module is one small dot of the code. Cropping the margin to save space is one of the most common reasons a printed code fails.

Contrast comes first

Scanners look for a difference in brightness, not for specific colors. Dark dots on a light background is the safe combination, and the bigger the difference, the faster the scan.

  • Use a dark foreground: black, navy, deep green, dark purple.
  • Use a light background: white, cream, pale yellow, light pastel.
  • Avoid inverted codes (light dots on a dark background). Many scanners handle them, but not all.
  • Avoid pairs that are close in brightness, such as yellow on white or red on dark green.
  • Be careful with gradients. Every part of the gradient must stay dark enough against the background.

Pick the right error correction level

Every QR code contains backup data that lets it be read when part of the pattern is missing. There are four levels, and each one can recover a different share of the code.

  • L (Low): recovers about 7%. Smallest, least dense code.
  • M (Medium): recovers about 15%. A good default for clean prints and screens.
  • Q (Quartile): recovers about 25%. Good for small logos and outdoor use.
  • H (High): recovers about 30%. Use it when a logo covers the center.

Adding a logo without breaking the code

A logo in the middle works because error correction rebuilds the dots the logo hides. That means the logo spends your error correction budget, so the two settings go together.

  • Set error correction to H, or Q for a very small logo.
  • Keep the logo modest. Covering around a fifth of the code area or less is a safe target.
  • Place it in the center, away from the three corner squares.
  • Give the logo a clear margin so dots do not touch its edges.
  • Use a simple, high-contrast version of the logo. Fine detail disappears at small sizes.

Dot and corner styles

Rounded dots, classy shapes and soft corners change the personality of a code without changing its data. Scanners cope well with these styles as long as the dots stay large enough to read and the corner squares still look like three distinct markers.

The more stylized the shape, the more you depend on good contrast and size. If you combine an unusual dot style with a logo and a tight color palette, test more carefully.

Keep the data short

The more characters you encode, the more dots the code needs, and the smaller each dot becomes at a given print size. Dense codes are harder to scan from a distance and less tolerant of blur.

Use the shortest URL that does the job. Drop unnecessary tracking parameters, and prefer a clean path over a long query string.

Size and file format

A common rule of thumb is that a code should be at least one tenth of the scanning distance. A code scanned from 30 cm away should be about 3 cm wide, and a poster read from 2 m needs roughly 20 cm. For anything held in the hand, treat 2 cm as the practical minimum.

For print, export SVG. It is a vector format, so the edges stay sharp at any size, from a sticker to a billboard. Use PNG for websites, emails and social posts, and export it larger than you need so it is never scaled up.

Test before you publish

Testing takes two minutes and saves a reprint.

  • Scan with at least one iPhone and one Android phone.
  • Test at the real size and the real distance, not zoomed in on a monitor.
  • Print a proof on the actual material. Glossy and curved surfaces cause glare and distortion.
  • Try it in poor light.
  • Confirm the link opens the right page and that the page works on mobile.

Frequently asked questions

Can a QR code be any color?

Yes, as long as the dots are clearly darker than the background. Scanners rely on contrast in brightness, so dark colors on a light background work best.

How big can a logo be in a QR code?

With error correction set to H, a centered logo covering around a fifth of the code area or less usually scans reliably. Always test the final design, because dense codes tolerate less.

What is the minimum size for a printed QR code?

About 2 cm by 2 cm for items scanned at close range. For longer distances, make the code at least one tenth of the scanning distance.

Should I download my QR code as PNG or SVG?

Use SVG for printing, because it stays sharp at any size. Use PNG for screens such as websites, emails and social media.