Barcode formats — properly called symbologies — encode data in different ways for different purposes. Choosing the wrong one is the usual reason a printed label refuses to scan, or scans into a system that then rejects the number.
Retail product codes: EAN and UPC
EAN-13 and UPC-A identify retail products, and they are not arbitrary numbers you can invent. The prefix identifies the issuing country organisation, the next block identifies the manufacturer, and the remainder identifies the product. Legitimate codes are allocated through GS1, the body that administers the system.
UPC-A is the twelve-digit North American variant; EAN-13 is the thirteen-digit international one. A UPC-A code is effectively an EAN-13 with a leading zero, which is why most modern scanners handle both transparently.
Both end in a check digit calculated from the preceding digits. If a scanner reads a barcode but your system rejects the number, a wrong check digit is the first thing to verify — it is designed to catch exactly the transposition errors people make when typing codes by hand.
Internal use: Code 128 and Code 39
For asset tags, shelf locations, work orders, and anything else that never crosses into retail, Code 128 is usually the right answer. It encodes the full ASCII set, including letters and punctuation, and is relatively compact.
Code 39 is older, encodes a smaller character set, and produces wider barcodes for the same data. It persists mainly because some legacy systems require it. Given a free choice, Code 128 is better.
Why printed labels fail
Most scanning failures are physical rather than logical.
- Insufficient quiet zone. Like QR codes, linear barcodes need blank margins at both ends — typically ten times the narrowest bar width.
- Printing too small. Compressing a barcode to fit a label makes the narrow bars thinner than the scanner can resolve.
- Low resolution. A barcode printed at screen resolution has soft bar edges; 300dpi or better is the practical minimum.
- Poor contrast or the wrong surface. Scanners need dark bars on a light background, and glossy laminate can reflect enough to defeat a laser scanner entirely.
- Scaling non-uniformly. Stretching a barcode horizontally changes bar-to-space ratios and can make it unreadable.
Test with real hardware
A barcode that scans perfectly from a monitor may fail on paper, because screens have far better contrast than most printing. Print a test sheet and scan it with the actual device that will be used in production — phone camera apps are considerably more forgiving than warehouse laser scanners, so testing with a phone can give false confidence.