BarcodeFree

Code 128 Barcode Generator – Free Online Tool

Generate Code 128 barcodes instantly — no signup required, completely free. Enter your data, preview the barcode in real time, and download it as a PNG. All processing happens in your browser.

Format

100px600px
50px300px

What is Code 128?

Code 128 is a high-density linear barcode symbology developed in 1981 by Computer Identics. It is one of the most widely deployed 1D barcode formats in the world, particularly in shipping, logistics, and inventory management applications.

The standard defines three subsets — A, B, and C — that can be mixed within a single barcode. Subset A encodes uppercase letters and ASCII control characters. Subset B covers the full printable ASCII range including lowercase letters. Subset C is optimized for numeric data, encoding digit pairs in a single symbol to achieve the highest possible density for numeric strings.

Code 128 supports all 128 ASCII characters, includes a mandatory check digit for error detection, and produces compact barcodes that are approximately 30% shorter than equivalent Code 39 barcodes. These properties make Code 128 the preferred choice for shipping labels, warehouse management systems, healthcare wristbands, and government identification documents.

Code 128 vs Other Barcodes

Choosing the right barcode format depends on the characters you need to encode, how compact the barcode needs to be, and what scanning infrastructure you are working with:

FormatCharacters SupportedData DensityCommon Use Cases
Code 128All 128 ASCII charactersHighShipping labels, inventory, healthcare
EAN-13Digits only (13 digits)Fixed-lengthRetail product packaging (Europe)
UPC-ADigits only (12 digits)Fixed-lengthRetail product packaging (North America)
Code 3943 characters (uppercase only)LowDefense, automotive, legacy systems

Where is Code 128 Used?

Code 128 barcodes appear across virtually every industry that relies on automated data capture. In logistics and shipping, carriers like FedEx, UPS, and national postal services use Code 128 on parcel labels to track packages through sorting facilities. Warehouse management systems use Code 128 on bin labels, pallet tags, and picking lists to guide workers and automate inventory counts.

In healthcare, Code 128 is printed on patient wristbands, medication packaging, and laboratory specimen tubes to reduce transcription errors and improve patient safety. Government and defense organizations use Code 128 on identification cards, asset tags, and supply chain documents where the full ASCII character set and high density are required. Retailers use Code 128 for internal shelf labels and receiving documents, even when EAN or UPC codes appear on consumer-facing packaging.

Frequently Asked Questions

What characters does Code 128 support?

Code 128 supports the full ASCII character set — all 128 characters, including uppercase and lowercase letters, digits, punctuation, and control characters. Subset A covers uppercase letters and control characters. Subset B covers the full printable ASCII range. Subset C is optimized for encoding pairs of digits, doubling numeric data density. This broad character support makes Code 128 one of the most versatile 1D barcode formats available.

What is the difference between Code 128 and Code 39?

Code 39 supports only 43 characters — uppercase letters, digits, and a handful of special characters — and encodes each character using 5 bars and 4 spaces. Code 128 supports all 128 ASCII characters and uses a more compact encoding scheme, producing barcodes that are roughly 30% shorter for the same data. Code 128 also includes a mandatory check digit, making it more reliable for scanning. Code 39 is still common in older legacy systems, but Code 128 is preferred for new implementations that require higher density or lowercase characters.

What is GS1-128?

GS1-128 (formerly known as UCC/EAN-128) is a special application of Code 128 that uses Application Identifiers (AIs) to structure data in a standardized way. It is widely used in supply chain and logistics to encode information such as batch numbers, expiration dates, serial numbers, and shipping container codes. GS1-128 barcodes always begin with the FNC1 character to signal GS1 formatting. If you are generating barcodes for retail supply chains, you likely need GS1-128 rather than plain Code 128.

What is the maximum data length for Code 128?

There is no hard limit defined by the Code 128 specification, but practical scanners typically handle up to 48 characters reliably. Very long Code 128 barcodes become physically wide, which can cause scanning errors if the label is too narrow or the scanner beam does not cover the full width. For best results, keep encoded data under 80 characters and ensure the printed barcode has quiet zones (blank margins) of at least 10 bar widths on each side.

Can I use Code 128 barcodes on product labels?

Yes. Code 128 is widely used on product labels, shipping boxes, warehouse bins, and internal asset tags. However, for retail point-of-sale scanning — where the barcode is scanned at checkout — you should use EAN-13 or UPC-A, as those are the formats that global retail systems are configured to read. Code 128 is the preferred choice for logistics labels, internal inventory systems, and any application where you control both the printing and scanning equipment.

What is the minimum size for a scannable Code 128 barcode?

The minimum recommended X-dimension (width of the narrowest bar) is 0.25 mm for high-quality printing environments. For standard office printing, 0.5 mm or larger is safer. The overall barcode width depends on the number of characters encoded, and the height should be at least 15% of the total barcode width, with a minimum of 6.35 mm. Always include quiet zones of at least 10X on each side of the barcode, where X is the X-dimension.

Is Code 128 free to use?

Yes. Code 128 is an open standard with no licensing fees or royalties. Any company or individual can generate and use Code 128 barcodes without paying a license. The standard is published by ISO/IEC 15417. This barcode generator is also completely free to use — no account, no subscription, and no watermarks. All barcode generation happens in your browser, and no data is sent to any server.