The two numbers that matter: X dimension and magnification
The X dimension is the width of the narrowest bar (or module) in the code. Retail standards such as GS1 define a nominal X dimension and let you scale to 80-200% of it. As a practical rule: bigger is more reliable. Never go below the symbology minimum, and if codes are read from a distance, print at the top of the range.
Minimum sizes for common formats
- EAN-13: about 30-38mm wide (full retail size). Scannable minimum roughly 25mm.
- UPC-A: about 30-38mm wide (North American retail). Similar minimum to EAN-13.
- EAN-8: about 21-27mm wide - the compact code for small packs.
- Code 128: no fixed retail size; keep 20mm+ wide for labels and 30mm+ on 4x6 shipping labels.
- Code 39: allow ~40% more width than Code 128 for the same data because it is a lower-density code.
- QR / DataMatrix / Aztec: keep the printed symbol at least 15-20mm wide for phone scanning; 10mm+ can work for industrial DataMatrix read by fixed scanners.
The quiet-zone rule
Whatever the size, every barcode needs clear white space - the quiet zone - on each side. For linear barcodes use at least 10 times the X dimension on each side (GS1 requires it). For QR and other 2D codes, the quiet zone surrounds all four sides. Treat the quiet zone as part of the barcode: if it is cropped or covered, the code will not scan.
Matching size to where the code is scanned
- Retail checkout: scan distance is a few cm - EAN/UPC at full retail size (30-38mm) is ideal.
- Warehouse handheld scanners: read from 10-50cm - print Code 128 or GS1-128 at 40mm+.
- Dock-door / conveyor readers: read from 1-2m - use the largest label your format allows.
- Phone scanning of QR: 20mm+ prints reliably even in poor light.
- DataMatrix on parts: read by close-range fixed readers - can be as small as 5-10mm when the reader and process are built for it.
How to verify before you commit
Generate your codes, print one test sheet at your target size, and scan every label with the actual device that will read it in production (a checkout scanner, warehouse gun, or the phone app customers use). If even one fails, increase the size or the quiet zone and test again. Verifying one sheet takes minutes and prevents a whole batch of unusable labels.
Reference