Barcodes
Why your ZPL barcode does not scan
A ZPL barcode can look correct on screen and still not be readable by the scanner. Most of the time it is not only about ^BC or ^BY, but about the combinatio…
Why your ZPL barcode does not scan
A ZPL barcode can look correct on screen and still not be readable by the scanner. Most of the time it is not only about ^BC or ^BY, but about the combination of module width, print quality, quiet zones, DPI and data format.
Common causes
The module width is too small
If the narrowest bar is only 1 dot wide at 203 DPI, heat spread and paper quality can blur the bars. Start with ^BY2 or ^BY3 and test with the real scanner.
Not enough quiet zone
Scanners need clear white space before and after the barcode. If text, borders or the label edge are too close, the symbol is recognized unreliably.
The barcode is too low
Very low barcodes are harder to read, especially with handheld scanners or on curved packages. Increase the height in ^BC, ^B3, ^BE or the barcode command you use.
Wrong symbology or invalid data
EAN and UPC need numeric data with a valid length and check digit. Code 39 supports only a limited character set. If the data format does not match, the scan can fail.
Darkness, speed or DPI do not match the material
Too much darkness makes bars wider; too little lets them break. High print speed can blur edges. Tune DPI, material and darkness before serial production.
Quick checklist
Choose a safe module width: test ^BY3 on 203-DPI printers and reduce only when the scanner reads stably.Leave clear quiet zones on both sides. Do not place borders, texts or images directly at the first or last bar.Increase the barcode height and keep the readable text enabled during testing so the encoded value can be compared.Check the data format: Code 128 for flexible alphanumeric data, EAN-13/UPC only for retail standards.Print a real label and scan it with the production device; a browser preview does not prove scannability.
Safe Code-128 test label
This example uses Code 128 with ^BY3 and 120 dots of height, a good starting point for many 203-DPI Zebra printers.
^XA
^PW812
^LL406
^FO40,40^A0N,32,32^FDCode 128 scan test^FS
^FO40,100^BY3,2,120
^BCN,120,Y,N,N
^FD123456789012^FS
^XZ
FAQ
Which ZPL command controls the barcode width?
^BY sets the module width, wide/narrow ratio and default height of many linear barcodes. The first value is the most important for reliable scanning.
Is a preview enough to prove scannability?
No. The preview helps with layout and data, but scannability depends on the real print, material, darkness, DPI and scanner.
Which barcode type should I use in ZPL?
Use Code 128 for most internal logistics and inventory labels. Use EAN-13 or UPC only when your retail system requires these standards.