Rule 1: Maintain a Minimum Contrast Ratio of 4.5:1
Contrast is the single most important factor in QR code scan reliability. The scanner in a phone camera works by detecting the luminance difference between the dark modules and the light background. If that difference is too small, the camera cannot reliably distinguish the pattern, and scanning fails.
The minimum safe contrast ratio is 4.5:1, the same threshold used in web accessibility standards for readable text. In practice, the safest color combination is black (#000000) modules on a white (#ffffff) background, which achieves a contrast ratio of 21:1. If you want to use brand colors, use a contrast checker before finalising. Dark navy on white, dark green on white, and dark brown on cream all pass at 4.5:1. Light grey on white does not.
Keep the foreground (modules) dark and the background light. This is not a stylistic preference. It is how QR code scanners are optimised to work.
Rule 2: Always Test Before Printing
This is the rule that is violated most often, and it is responsible for the majority of QR code failures in the real world. Always scan the finished code (after all design customisation, color changes, and logo additions) using at least two different devices before sending to print.
Test with an iPhone using the native camera app. Test with an Android device. If you have an older device available, test with that too, since older cameras are more demanding and will reveal marginal codes that newer phones might just barely handle. If the code fails on any device, fix the issue before printing. A print run of 5,000 flyers with a broken QR code cannot be recalled.
Rule 3: Never Neglect the Quiet Zone
The quiet zone is the clear, unprinted margin that surrounds the QR code pattern on all four sides. It is not decoration. It is a functional part of the code. The scanner uses the contrast boundary between the quiet zone and the outermost modules to locate the edges of the code. Without adequate quiet zone, the scanner cannot determine where the code begins and ends, and decoding fails.
The QR standard specifies a quiet zone of at least four modules wide on all sides. A module is one of the small squares in the pattern. For a typical code printed at 25 mm square with a 25×25 module grid, four modules equates to roughly 4 mm of clear space on each side.
When placing a QR code in a design, always ensure background colors, images, text, and decorative elements stop well short of the code pattern. The quiet zone must be the same color as the code's background. Placing the code inside a white box with padding is the simplest and most reliable way to guarantee a proper quiet zone regardless of the surrounding design.
Rule 4: Never Invert the colors
An inverted QR code (white modules on a dark background) looks striking and is technically supported by the QR standard. In practice, many real-world QR scanners, particularly older ones and the native camera apps on certain Android devices, do not reliably scan inverted codes.
The issue is that most scanning algorithms assume a dark-on-light pattern. Inverted codes require additional processing, and not all implementations include it. Rather than risking a percentage of scan failures, use the standard orientation: dark modules, light background. If your design requires a dark background, place the QR code inside a white box with adequate padding, which solves the design challenge without the reliability risk.
Rule 5: Keep Your Logo Within 20-25% of the Code Area
Logos overlaid on QR codes are popular for branding purposes and work reliably when done correctly. The key constraint is size: the logo must not cover more than 20-25% of the total code area.
At Level H error correction (30% recovery capacity), a logo covering 20-25% of the code leaves a safety margin above the theoretical limit. This margin matters because printing imperfections, screen glare, and camera angles can degrade the readable area beyond the logo itself. Never push the logo right up to the 30% theoretical limit. Always keep a buffer.
Also ensure the logo does not overlap the three corner position-detection patterns (the distinctive square-within-square markers in three corners of the code). These are essential for the scanner to orient itself and must always be fully visible.
Always use Level H when adding a logo. See our full guide on error correction levels for the technical background.
Rule 6: Include a Call to Action Near the Code
A QR code without a label relies entirely on the viewer knowing what to do with it. Many people still do not instinctively reach for their camera when they see a QR code, particularly older demographics and people in countries where QR code adoption is lower.
A short, direct call to action placed immediately below or beside the code removes the ambiguity and increases scan rates measurably. Effective CTA labels are specific and action-oriented:
- "Scan to save contact"
- "Scan for our full menu"
- "Scan to watch the product demo"
- "Point your camera here to book a table"
Generic labels like "Scan me" are better than nothing but significantly less effective than a label that tells the user exactly what they will get.
Rule 7: Test on Multiple Devices and Apps
Different scanning implementations have different tolerances for contrast, module density, quiet zone size, and color inversion. A code that scans perfectly on the latest iPhone may fail on a mid-range Android from three years ago. Before committing to a large print run, test your finished code on:
- iPhone native camera app (iOS 16+)
- A current Android device using the native camera
- An older Android device if you have access to one
- Google Lens
If any of these fail, investigate the cause before printing. Common culprits are insufficient contrast, an oversized logo, an inadequate quiet zone, or a code that is simply too complex for the size it will be printed at.
Rule 8: Use PNG, Not JPG
JPEG compression is designed for photographs. It works by discarding fine detail that the human eye is unlikely to notice. QR code modules are precisely defined geometric shapes with hard edges. JPEG compression introduces blurring and artefacts along those edges, which degrades scan reliability, especially on codes that will be printed at smaller sizes.
PNG uses lossless compression: every pixel is preserved exactly as it was generated. The file size difference between a PNG and a JPEG for a QR code is typically negligible (a few kilobytes), so there is no practical reason to use JPEG. Always download and store QR codes as PNG files, and always supply PNG to printers and design software.
If you have accidentally converted a QR code to JPEG and introduced artefacts, regenerate the code fresh from Vexifa rather than attempting to clean up the compressed file.
Rule 9: Print Test at Actual Size Before the Full Run
Before committing to a large print run, or even before sending a small print job to a professional printer, print one copy at the exact size the code will appear, on the actual substrate (paper type, card stock, or material), and scan it. This step catches problems that no digital preview can reveal:
- Ink spread on absorbent paper stock can cause modules to bleed together, increasing effective module size and reducing contrast
- Certain coatings and laminations can create glare that interferes with scanning under normal lighting
- Low-quality inkjet printers may not reproduce the fine detail of dense QR codes accurately
- The actual printed color may differ from the screen color, potentially reducing contrast below the 4.5:1 threshold
A single test print costs almost nothing. Discovering a scan failure after printing 10,000 units costs significantly more.
Rule 10: Keep the Encoded URL Short
The amount of data encoded in a QR code directly determines its complexity. More data means more modules in the pattern, which means a denser code that is more difficult to scan at small print sizes and less tolerant of printing imperfections.
A short URL like https://yoursite.com/menu produces a simpler, cleaner code than a URL with tracking parameters, session IDs, or deeply nested paths. Where possible:
- Use a short, clean URL as the code destination
- Create a dedicated short path on your own domain (e.g.,
yoursite.com/menuredirecting to a longer internal URL) - If you need UTM parameters for analytics, add them to a redirect page rather than encoding them directly in the QR code
- Remove unnecessary URL components, such as trailing slashes, default ports, and redundant query parameters, which all add characters that increase code complexity
A shorter URL produces a simpler code that scans faster, more reliably, and at smaller print sizes. It is one of the highest-leverage things you can do to improve QR code performance without changing the visual design at all.
Frequently Asked Questions
Can I use a coloured background instead of white for the QR code?
Yes, as long as the contrast between the module color and the background color meets the 4.5:1 minimum ratio. Light yellow, light cream, and very light grey can work as backgrounds provided the module color is dark enough. Use a contrast checker tool to verify the specific color values before printing.
What is the safe maximum logo size for a QR code?
Keep the logo within 20-25% of the total code area. This leaves a safety margin below the 30% recovery capacity of Level H error correction. Always use Level H when adding a logo, and always test the finished code on multiple devices before printing.
My QR code scans on my phone but not on my colleague's phone. Why?
Different camera apps and scanning implementations have different tolerances. The most common causes are marginal contrast (just barely passing on a high-quality camera, failing on a lower-quality one), an oversized logo, an inadequate quiet zone, or a code that is close to the density limit for its print size. Address each of these factors and retest.
Can I add a border or frame around the QR code?
Yes. Decorative frames around QR codes are common and do not affect scan reliability, provided they do not intrude on the quiet zone. Ensure there is still at least four module-widths of clear space between the code pattern and any frame, and that the frame is visually distinct from the code pattern itself (i.e., does not look like modules).
Is it safe to reduce the QR code's opacity?
Reducing opacity reduces the effective contrast of the code against its background, which directly reduces scan reliability. Even a modest opacity reduction, say from 100% to 85%, can take a code that passes the 4.5:1 contrast threshold and push it below the safe threshold. Use full opacity for QR codes, and achieve any desired visual integration through color choice rather than transparency.