How Code-128 Packs Data Into Bars
Code-128 is a widely used 1D (linear) barcode symbology capable of encoding the full ASCII character set — letters, digits, and punctuation — using varying-width black bars and white spaces, unlike simpler numeric-only barcode formats. Each character maps to a specific pattern of bar/space widths, and a checksum digit is calculated and appended automatically, letting a scanner detect a misread or damaged barcode rather than silently returning wrong data.
Code-128's ability to encode full alphanumeric text (not just digits) is exactly why it's common for SKUs, tracking numbers, and internal asset labels where the encoded value isn't purely numeric — formats like UPC/EAN, by contrast, are fixed-length and numeric-only, designed specifically for retail product identification rather than general-purpose alphanumeric labeling.
A barcode's scannability depends heavily on contrast and print quality, not just correct encoding — a barcode printed too small, at low contrast, or on a reflective surface can fail to scan reliably even though the underlying encoded data is perfectly correct, which is worth testing with an actual scanner before relying on printed labels at any real scale.