2D Barcode for Mobile – What Size?

What barcode size for mobile devices?So you need to produce a 2D barcode for use with mobile devices? What size should it be to ensure that every smartphone can successfully read it?

I had to do some testing on this for one of our clients and I thought it would be interesting to share the results here as well.

To start, if you are planning to use a 2D barcode in a project, chances are that it will be either Datamatrix or QR Code that you are turning to.

Being an industrial barcoding guy, I would normally turn to Datamatrix, but the QR Code has become very popular for all kinds of mobile applications and probably has a bigger infrastructure of scanning apps that can read it. I think every scanning app I’ve come across supports QR, but not every one can read Datamatrix.

It really doesn’t matter which you choose, in either case it is important that the barcode is small enough to be able to fit inside the space allocated for it, but large enough to be successfully scanned every time – we’ve all been frustrated by 2D barcodes that won’t scan (or scan but don’t do what they are supposed to do – that’s a different story!) and we don’t want to annoy our potential clients.

2D Barcodes - which one to use?One important thing is to understand how we define the size of a barcode. Generally we wouldn’t measure the size of a Datamatrix or QR Code and say “this QR Code is 1 inch square”. Well actually we could do that, but it doesn’t really help here.

What we are interested in is the Element Size – the size of the little individual squares that make up the barcodes.

Here’s a screenshot from the label design software I use, BarTender:

Setting the Element Size in a 2D barcode.

The size of the barcode elements is determined by the “X Dimension”. This is actually a reference to linear barcodes, such as UPC codes, where the X Dimension is the width of the small bar in the barcode. For 2D barcodes, such as Datamatrix and QR Codes, this dimension is the width of the small elements that make up the code. The units of this in BarTender are “mils” where one mil = 0.001 inches.

When printing barcodes for industrial barcode scanners (both linear and 2D) it is a good practice to keep the X Dimension greater than 7.5 mils (0.0075 inches). This ensures that any industrial quality barcode scanner is able to read the barcode. Note that label printers are not able to print any size barcode – this is discussed in my printer resolution article here.

But what about barcodes intended to be read with consumer phones, such as iPhones or Android devices? One thing is for sure, smartphone cameras are getting to be really good these days, but they are not high resolution barcode scanners.

Testing

To check this out (in an admittedly non-scientific test) I printed out some Datamatrix and QR Codes in various sizes and tried to read them using the QuickMark app in my iPhone.

2D Barcode Scan Test

2D Barcode Scan Test

The table on the right shows the results I got.

Obviously barcodes with a 33 or 20 mils size are simple to scan – the scanner app captures the image and decodes the barcode just as fast as I can point the phone camera at them.

Go down to 16 mils and things change a little. I found that the QR Code scanned quite well, but the Datamatrix was a little tricky and needed some focusing in and out to grab the image.

At 10 mils, I could not decode a Datamatrix at all, but the QR was readable – not as fast to capture as the larger sizes, but still usable. I suspect this better performance from the QR code might be because the reader is optimized for this symbology.

Conclusion

I did mention that my little test wasn’t scientific and I’m sure that scanning performance varies a lot between different smartphones and different scanning apps. Someone carrying out the same test with different hardware/software might well get different results.

With this in mind, I wouldn’t go below 20 mils for any 2D barcode that needed to be read by a consumer device.

Of course, making the Element Size larger increases the overall size of the barcode and it might get to be too big for the space allowed. If this happens look at making the amount of encoded data smaller. If it is a URL, use a shortener service to reduce the number of characters (we use a custom bit.ly URL, winco.cc for our shortened links) and if contact information use a vCard service such as Microsoft Tag (we use this on our business cards and it is great).

It is always a trade off between size and amount of data, but if you think it through, you can come up with a scenario that encodes all the data you need at a size that is readable for anyone with a smartphone.

Do you use 2D barcodes on your products or marketing? How do you make sure that your codes are always readable? What’s your favorite smartphone barcode app? Can we help you with your labeling or barcoding? Call me at 603-598-1553 x237 if we can!

Share Button