Get your QR codes out there!

When a QR code is published it should be of a size that’s appropriate for the scanning environment it’s being put into. The finished printed size of the QR code will be dependent on:

The distance between the QR code and the scanning device – which determines the size of the QR code in the viewport of the phone camera

The size of the dots in the code – the more data you put into the code the smaller the dots become

Scan Distance

To effectively scan the QR code it should appear to be at least 1cm (0.4 inches) across in the viewport of the scanning device, and as the distance between the camera and the QR code increases, the size of the QR code will need to increase to compensate.

If you have a QR code on the side of a building it would need to be very large because it’s going to be scanned from a long distance, however if it’s printed in a magazine then the scanning device will be held quite close to it so it can be much smaller.

For most smartphones the relationship between scan distance and minimum QR code size is approximately 10:1 so a 2.5cm (1 inch) QR code printed in a magazine will have a nominal effective scan distance of about 250mm (10 inches), and a QR code on a billboard 20 metres (65 feet) from the where a passer-by would be scanning it would probably need to be about 2 metres (6.5 feet) across. There’s a bit of latitude here depending on the sort of smartphone but 10:1 is a good rule of thumb for a well-lit black and white QR code being scanned front-on.

Simple Formula:

Minimum QR Code Size = Scanning Distance / 10

If you have a poorly lit or obliquely positioned QR code, or a coloured one where the foreground/background colour contrast might not be optimal, you should probably reduce this ratio to 8:1 or less (ie; the QR code size should 1/8th or less of the scan distance).

QR Code Data Density

As mentioned above, the more data you put into the code the smaller the dots (the dark pixel squares) become as the QR code adjusts itself to increase its data storage capacity.

The density of the code is described by a version number that is based on the number of rows and columns of dots. A Version 1 QR code will have 21 rows and 21 columns of dots and the version number will then increase by 1 for every 4 extra rows and columns – a Version 2 QR code will have 25 rows and columns, a Version 3 will have 29 rows and columns, right through to a Version 25 that will have 117 rows and columns.

As the size of the dots decrease they become harder for the scanner in the smartphone to “see” so the QR code itself needs to be made larger in order for it to be reliably scanned.

Most QR codes containing just a website address end up being Version 2 QR codes with 25 rows and columns of data dots. I talked about keeping the size of the QR code in the viewport of the scanning to 1cm (0.4in) or better – with 25 rows and columns of dots in a “normal” QR code this would make each of the dots 0.4mm (0.016in) across as a minimum, and this is actually the “magic number” that makes a QR code reliably scannable.

It was probably a bit simplistic to say that the QR code image should be at least 1cm (0.4in) across in the viewport of the camera – what I should have said was that each of data dots should be at least 0.4mm (0.016in) across, and there’s how the data density of the QR code affects the its scanning reliability. A QR code with a high data density is going to have more rows and columns of dots in it, so each dot will be smaller relative to the size of the QR code itself. If the dots are too small then the QR code will be difficult to scan because the data dots are below the resolution limit of the scanning device.

QR codes containing long URL’s (like Google Maps address URL’s) may result in up to a Version 6 or Version 7 QR code with 41 or 44 rows and columns of dots.

QR codes containing vCard contact details have notoriously high data densities and will result in Version 10 or Version 11 QR codes with more than 60 rows and columns of dots.

To keep each data dot at the recommended 0.4mm (or greater) when viewed in the viewport of the camera you will need to make the QR code image itself significantly larger.

HINT: Using a URL shortener to reduce the number of characters in a long URL will result in a code with larger dots and hence it can be reproduced at a smaller size without impacting scan reliability.

Calculating The Size

The recommended minimum size of the QR code image is determined by the scanning distance and the size of the data dots in the QR code, and can be calculated by first determining:

Distance Factor: Start of with a factor of 10 then reduce it by 1 for each of poor lighting in the scan environment, a mid-light coloured QR code being used, or the scan not being done front on.

Data Density Factor: Count the number of columns of dots in the QR code image and then divide that by 25 to normalise it back to the equivalent of a Version 2 QR code.

A QR code containg vCard contact details has resulted in a Version 10 QR code with 57 rows and columns of data dots. It’s to be printed on a business card in black and white and it’s expected that the scanning distance will be about 150mm.

A QR code is to be placed behind the counter of a restaurant containing a simple link to a coupon download. The QR code is Version 2 so has 25 rows and columns of dots. The lighting is a bit dim and the scan distance will be 2.5m.

A QR code containing a Google Maps location link is to be published in a magazine. This has resulted in a Version 6 QR code (41 rows and columns of data dots) and it will be printed in mid-blue to match the business colours. It’s expected that the scan distance will be about 200mm.

[…] problems capturing the tiny dots. To learn how much data is appropriately stored in a QR Code, check out this article. FiG has a simple solution to the size problem: Shorten the URL before you generate a QR Code. […]

[…] To print on a piece of marketing collateral, the area of the code is often limited. Adding lots of data to a small code size means that the code image could be so dense that it can’t be read by the scanning device. A good rule of thumb is that a printed QR code should be no smaller than 2x 2cm – though it’s also dependent on the distance between the code and the scanning device. Read more technical detail about code sizes in this post: QR Stuff blog. […]

[…] QRstuff.com says that the relationship between scan distance and minimum QR code size is roughly 10:1. So a 2.5cm (one inch) QR code printed in a magazine will have a nominal effective scan distance of about 250mm (10 inches), and a QR code on a billboard 20m (65ft) from the where a passer-by would be scanning it would probably need to be about 2m (6.5ft) across […]

[…] experience? – Always link to a mobile site, never a desktop. – Consider the relationship between QR code sises and scan distance. Think 10:1 (ex: a one inch QR code will have a scan distance of about 10 inches). – Use a URL […]

[…] – Always link to a mobile site, never a desktop. – Consider the relationship between QR code sises and scan distance. Think 10:1 (ex: a one inch QR code will have a scan distance of about 10 inches). – Use a URL […]

[…] be very technical, the patterns are formed by the number of rows and columns the code has. The minimum rows and columns a QR code can have is 25 which can fit approximately 26 characters as it’s serial code or […]