QR3D Craft

A code on a curved surface: how big it can be

By · 6 min read · Updated 27 October 2026

Leer en español

A mug, a flask or a planter look like the perfect place for a code. And they are, with one condition almost nobody calculates: the curve fools the reader, and past a certain size the phone reads the square next door. This guide does the maths and turns it into a rule you can remember without paper.

Why the curve fools the reader

A QR reader assumes the code is flat. The first thing it does is find the three big corner squares, and from them it lays the grid out in a straight line: if there are 33 modules between two corners, it divides that distance into 33 equal parts and looks at the centre of each.

On a cylinder, that assumption fails. Seen head on, the centre of the code faces you and the edges are seen almost edge-on, so the modules at the sides look narrower than the ones in the middle. The real grid is no longer in equal parts, and the reader, which does use equal parts, starts looking slightly off. Nothing happens in the centre; the drift grows towards the sides, and when it reaches half a module the phone is looking at the neighbouring square.

Error correction recovers some misread modules, but not a whole displaced column: at that point the failure is not one stray module, it is an entire band.

A 40 mm code and an 80 mm one wrapped round an 80 mm mugA 40 millimetre code on an 80 mm mug: the edge module is seen at 88 per cent and the reader drifts by 0.24 modules. An 80 millimetre code on an 80 mm mug: the edge module is seen at 57 per cent and the reader drifts by 1.39 modules.An 80 mm mug seen from aboveØ 80 mmcameraA row of 33 modules, as the phone sees it40 mm, half the diameteredge module seen at 88 %the reader drifts 0.24 modules80 mm, a whole diameteredge module seen at 57 %the reader drifts 1.39 modules
At half the diameter the edge modules barely narrow and the reader lands inside every module with room to spare. At a whole diameter the drift passes one module: the phone reads the square next door and the code does not come out.

The half-diameter rule

Doing that calculation for objects of every size gives something surprisingly clean: the drift depends almost entirely on how big the code is compared with the diameter of the object. And the comfortable limit always falls in the same place:

The code should not be more than half the diameter. We mean the width of the black square, not counting the white margin. At that proportion the reader drifts by at most a quarter of a module, which is a comfortable margin. Up to about seven tenths of the diameter it can still read, but with nothing in hand: any tilt of the wrist knocks it over.

Translated into real objects, for an ordinary link of about 34 characters:

ObjectDiameterComfortable codeLimit
Water bottle, can66 mm33 mm45 mm
Flask75 mm38 mm51 mm
Mug82 mm42 mm56 mm
Small planter110 mm56 mm76 mm
Medium planter150 mm76 mm103 mm
Bucket, bin300 mm153 mm207 mm

The column to use is the middle one. The right-hand one is for knowing where the cliff is, not for walking up to it.

Two caveats the table does not state. The calculation assumes the phone looks head on and from some distance. Up close, perspective exaggerates the curve, so if the code is going to be scanned a hand's width away, like one on a mug somebody is holding, stay below the comfortable column. And on a tapered planter the diameter changes with height: use the smallest one in the band the code covers, which is always the bottom.

Why shortening the link does not fix this

On a flat piece, when the code does not fit, the first piece of advice is to shorten the link: fewer characters, fewer modules, bigger modules. It is explained in the link guide. On a curve that advice helps with something else, but not with this.

The reason is that the drift is measured in modules, and changing the module count changes both the size of each one and the distance the error travels, in the same proportion. On an 80 mm mug, the comfortable width is 42.5 mm with 21 modules and 40 mm with 45: practically the same. What rules is the width, not what is inside it.

Shortening the link is still worth it, but because of the nozzle: within that fixed width, fewer modules means bigger modules, and that is what decides whether the printer draws them cleanly. Which is exactly what sets the limit below.

The thinnest object that takes a code

Two rules meet here. This guide's says the code cannot exceed half the diameter. The minimum size guide says each module has to be at least twice the nozzle: 0.8 mm with the 0.4 nozzle almost every printer has.

Together they give a diameter below which there is nothing to be done:

What the code carriesModulesMinimum diameter with a 0.4 nozzle
Short domain, 17 characters2946 mm
Ordinary link, 34 characters3353 mm

So a handlebar, a 25 mm tube or the handle of a tool will not take a wrapped code: at 25 mm of diameter, the comfortable code would be 12.5 mm and its modules 0.38 mm, half what an ordinary nozzle can draw. For those objects, the answer is a flat tag hung off it, like a keychain tied on with a cable tie, not a code stuck around it.

How to get the piece onto the curve

This site's generator makes flat pieces. To put them on a curved surface there are three routes, and they are worth looking at in this order.

1. Find the flat part. Almost every curved object has one: the lid of a flask, the base of a planter, the front of a bin that is not quite round. A flat code on a flat area has none of the problems in this guide. If the object has one and it is visible from where the code will be scanned, that is the best option by a distance.

2. Bend a thin plate with hot water. PLA softens above about 60 °C. With the base at the minimum the generator allows, 1.6 mm, and the relief at 0.6 mm, the plate bends with no effort after a few seconds in hot water, not boiling. Wrap it round the object, or round a jar of the same diameter if the object cannot take the heat, hold it with an elastic band and let it cool there.

Do not try it cold. Bending stretches the outer face: with that plate on an 82 mm mug, by 2.6 %; with the 3 mm base the generator uses by default, almost 5 %. Cold PLA cracks in that range, and the crack comes out exactly between the modules. Warm, it stretches without trouble, and that 3 % extra on the width of the modules is something no reader notices.

Once cold, it sticks on with outdoor double-sided tape or a drop of silicone at each corner. Instant glue shatters with changes of temperature.

3. Print in flexible filament. A TPU plate adapts to the curve on its own and can be taken off and put back. The colour change works the same as with PLA, with the pause at the base height, but TPU prints slowly and the smaller modules struggle to come out clean. It works for large codes, not for pushing the size.

There is no such thing as a dishwasher-proof piece. If the object is a mug in daily use, PLA deforms in the wash and PETG holds up better but not forever. Put the code where the hot water does not reach, or accept that the piece is for a display mug.

How to test it

The order of tests is the usual one, with one addition. Before printing, draw the black square on paper at the chosen size, tape it round the object and scan it: it is the real size test, but with the curve already there, and it tells you in thirty seconds whether the width holds.

Scan it two ways: head on at the normal distance, and up close, the way somebody holding the object would. If it reads from far and hesitates up close, you are at the edge of the table and it is worth dropping the size one step. What works on wrapped paper will work on the piece, because the geometry is the same.

Generate the thin plate

Choose the plate, set the size so the code comes under half the diameter, and bring the base down to 1.6 mm. The generator tells you the module size before you download.

Open the generator

Keep reading