A QR code that scans perfectly on a flat proof can struggle once it's wrapped around a bottle, a can, a candle jar or a cosmetic tube. Nothing is wrong with the code itself; the shape of the object changes what the phone camera sees.
This guide explains what goes wrong, gives you simple math to size a code for a curved surface, and lists the practical fixes that make the biggest difference.
Why curves cause trouble
A QR code is a grid of square modules, and a scanner expects them to be evenly spaced. When you wrap a flat code around a cylinder:
- The edges turn away from the camera. Modules near the left and right edges are seen at an angle, so they look narrower than modules in the center.
- The spacing becomes uneven. The scanner has to work out the grid from the finder patterns (the three big corner squares), and a squeezed grid makes that harder.
- Part of the code can disappear. If the code wraps far enough around, the edges and the quiet zone slip out of view.
- Light reflects in a stripe. Shiny cylinders often show a bright vertical highlight that can wash out a column of modules.
The curve only bends the code in one direction. On a standing bottle, the code still looks normal vertically; only its width is distorted.
The key number: code width vs diameter
How much a code is distorted depends on one ratio: the printed code width divided by the object's diameter. Measure the code's full width, including its quiet zone.
When a code of width w is wrapped around a cylinder of diameter d, each edge sits at an angle of w ÷ d radians from the center line (multiply by about 57.3 to get degrees). The modules at the edge look narrower by a factor equal to the cosine of that angle.
Here's what that works out to:
| Code width ÷ diameter | Edge angle from center | Edge modules appear | Share of the circumference |
|---|---|---|---|
| 0.2 | about 11° | 98% of true width | about 6% |
| 0.3 | about 17° | 96% | about 10% |
| 0.4 | about 23° | 92% | about 13% |
| 0.5 | about 29° | 88% | about 16% |
| 0.6 | about 34° | 83% | about 19% |
| 0.8 | about 46° | 70% | about 25% |
| 1.0 | about 57° | 54% | about 32% |
Distortion grows quickly as the code gets wider. At half the diameter, the edge modules are about 12% narrower than the center ones. When the code is as wide as the diameter, the edge modules look roughly half their true width.
There's no single official limit, and phones vary. But a conservative starting point is to keep the code no wider than about half the diameter, then test. If you must go wider, test more carefully.
Make a free QR code for a link, WiFi or contact card — generated in your browser.
Open the free QR code generator →Worked example: a 60 mm bottle
Say your bottle is 60 mm across. Its circumference is π × 60 ≈ 188 mm.
| Code width | Width ÷ diameter | Edge angle | Edge modules appear |
|---|---|---|---|
| 25 mm | 0.42 | about 24° | about 91% |
| 30 mm | 0.50 | about 29° | about 88% |
| 40 mm | 0.67 | about 38° | about 79% |
| 50 mm | 0.83 | about 48° | about 67% |
Using the half-diameter starting point, a code around 30 mm wide, including quiet zone, is a sensible first proof for this bottle. A 50 mm code would wrap more than a quarter of the way around, and its edges would look about a third narrower than they really are.
Make every module count
On a small curved surface you can't just make the code bigger, so make the code simpler instead. A QR code with fewer modules has larger modules at the same printed size, which helps the scanner cope with distortion.
- Use a short link. Less data means a smaller QR version with fewer modules. A short URL on your own domain, or a short redirect link, is ideal. See how much data a QR code can hold.
- Think about the error correction level. Higher levels add more modules. On a clean, protected label, a lower level keeps modules bigger; on a surface that may get scratched, a higher level gives more damage tolerance. Our guide to error correction levels explains the trade-off.
- Skip the logo if space is tight. A logo relies on error correction to cover the modules it hides, which leaves less margin for distortion.
- Use a stable link. Packaging is often printed in large runs, so the link should keep working for years. See static vs dynamic QR codes.
Also check the module size isn't too small for the scanning distance; our minimum QR code size guide covers that.