Barcodes and QR codes

Which one to use

TypeUse it forData it accepts
Code 128Internal SKUs, asset tags — the sensible defaultAny letters, numbers and punctuation
EAN-13Retail products sold through scanners12 digits — the 13th is calculated for you
UPC-ARetail, North American supply chains11 digits — check digit calculated
Code 39Older systems, industrial equipmentCapital letters, digits, and - . $ / + %
ITF-14Carton and outer-case labels13 or 14 digits
ISBNBooksISBN-10 or ISBN-13
QR CodeLinks, product info, anything a phone will readUp to about 4,000 characters
Data MatrixVery small items, pharmaceuticalUp to about 2,300 characters
PDF417Shipping labels, licencesUp to about 1,800 characters

Sizing so it actually scans

This is where most barcode problems come from. A one-dimensional barcode needs physical width — squeezing it to fit a small label is the commonest cause of a scanner that will not read.

  • Code 128 with a typical SKU: at least 25 mm wide, 10 mm tall.
  • EAN-13: at least 30 mm wide. The retail standard is about 37 mm.
  • QR and Data Matrix: at least 15 × 15 mm for a phone camera.
  • Leave a clear margin — about 3 mm of white space either side of a 1D barcode.

The designer warns you when a barcode is too narrow for its symbology, before you print five hundred of them.

Never scale a printed sheet. Printing "fit to page" or at 95% changes the bar widths and can make a perfectly good barcode unreadable. Always print at 100%.

Check digits

EAN-13, EAN-8 and UPC-A each end in a check digit calculated from the preceding digits. If your data has 12 digits for an EAN-13, the 13th is worked out for you. If you supply all 13, it is validated — and you will be told if it is wrong, which usually means a transcription error somewhere upstream.

Printer resolution

A 203 dpi thermal printer is fine for most retail barcodes. For very small barcodes, or Data Matrix on small items, a 300 dpi printer makes a visible difference. If you are printing to laser, use the highest quality setting — draft mode thins the bars.

Testing

Print one sheet and scan several labels with the scanner that will actually be used at the till. A phone app is a reasonable first check, but retail laser scanners are fussier about bar width than phone cameras.