What is Code 128?
Code 128 is a high-density linear barcode symbology that can encode the full ASCII character set. It is the most widely used barcode format in logistics, shipping (GS1-128), and warehouse inventory because it is compact and can encode letters, numbers and symbols.
Common Uses for Code 128
- Shipping labels (UPS, FedEx, DHL use Code 128 variants)
- Warehouse inventory and bin location tracking
- Retail internal stock management
- Healthcare specimen and patient ID labels
Code 128 vs GS1-128
Code 128 and GS1-128 use the same underlying symbology, but GS1-128 adds standardized Application Identifiers (AIs) that tell scanners what each part of the data means - for example (01) for a GTIN or (00) for an SSCC. If your supply chain partners require GS1-compliant data (common in retail, grocery and healthcare), use GS1-128 with the correct AIs. If you just need a compact barcode for internal tracking, plain Code 128 is simpler.
Code 128 Check Digit
Code 128 includes a built-in check character that the scanner uses to verify the barcode reads correctly. Unlike EAN-13 or UPC-A, you don't need to calculate this yourself - it is encoded automatically. The tool handles it for you, so every barcode you generate here is valid and scannable.
Code 128 Barcode Size Requirements
Code 128 is a high-density symbology, so it stays scannable even when printed small. As a rule, keep the narrowest bar (the X dimension) above 0.25mm and leave at least 10 times the X dimension of quiet space (white margin) on each side. On 4x6 shipping labels, Code 128 at scale 2-3 scans reliably with most warehouse scanners.
Code 128 Character Sets A, B and C
Code 128 has three subsets. Set A covers uppercase letters, digits and control characters; Set B adds lowercase letters; Set C packs two digits into one character, making pure numbers about half as wide. An encoder shifts between sets as your data demands - a value like INV-2026-0417 mixes B and C automatically. This is why Code 128 beats Code 39 for mixed data: the encoder always picks the cheapest representation for each part of your string.
Code 128 vs Code 39: which to choose
For new label systems, Code 128 is the better default: it encodes lowercase and full ASCII, is roughly 30-40% more compact, and every modern scanner reads it. Code 39 remains right only when a customer specification, government standard or ancient scanner fleet mandates it. If your values are purely numeric and very long, Interleaved 2 of 5 is denser than both - but for anything containing letters or dashes, Code 128 wins.
Reference