How many characters fit in a barcode at a given label width, print density and module width — module geometry measured from our own engine.
A 4 inch label at 203 dpi is 812 dots wide. At a module width (X) of 2 dots:
| Symbology | Modules / character | Fixed modules | Fits | Width (dots) | |
|---|---|---|---|---|---|
| Code 128 | 11 | 35 | 31 | 792 | |
| Code 39 | 13 | 25 | 27 | 792 | |
| Code 93 | 9 | 37 | 38 | 798 | |
| Codabar | 10 | 2 | 38 | 804 | |
| MSI | 12 | 7 | 31 | 798 | |
| EAN-13 | — | 113 | 13 digits (fixed) | 226 | † |
| EAN-8 | — | 81 | 8 digits (fixed) | 162 | † |
| UPC-A | — | 113 | 12 digits (fixed) | 226 | † |
| UPC-E | — | 67 | 8 digits (fixed) | 134 | † |
| ITF-14 | — | 165 | 14 digits (fixed) | 330 | † |
† quiet zone already included in the measured width
Width in dots = (fixed modules + modules per character × characters + quiet zone) × X. In ZPL the module width X is what ^BY sets, and it is measured in printer dots — so the same barcode is physically narrower on a 300 dpi head than on a 203 dpi one. The label width you enter is converted with inches × dpi and rounded down.
Generate a barcode · Try it in the ZPL viewer · Dots, mm and DPI migration