This page is available in English.

Code 128 Barcode

The camera app can scan this. The Zebra app can scan this.

Code 128 is the workhorse of logistics labels because it can carry any ASCII character in a short symbol. It switches between three subsets, packs digits in pairs when possible, and protects the data with a modulo 103 check character.

Also called Code-128, USS-128, ISO/IEC 15417 barcode.

In this family

Specifications

StandardISO/IEC 15417
Character setFull 128-character ASCII (subsets A, B, C); extended Latin-1 via FNC4
CapacityVariable (no fixed maximum; limited by symbol width and scanner)
Check digitMandatory modulo 103 check character
Dimension1D linear
OriginDeveloped by Computer Identics Corporation in 1981

Where it is used

Shipping labels, logistics, healthcare, manufacturing, retail back-office

Shipping labels use it when the text may include letters and the symbol still has to stay short.

Sets A, B, and C are character sets inside one symbol. The camera app and the Zebra app show it as Code 128 and do not name the set.

Example

ABC123

Scan and create

Create this code opens the barcode generator with this symbology and the sample text filled in.

The camera app can scan this. It returns the raw text. It does not open links, look up products, or start a payment. The desktop companion types that text into the focused field.

The Zebra app can scan this. It returns the raw text.

Character sets

A, B, and C are character sets inside one Code 128 symbol, not three barcodes. The camera app can scan this. The Zebra app can scan this. Both show it as Code 128. Neither one says which set was used.

Code 128A

Code 128 has three character sets, and subset A contains upper-case letters, digits, punctuation and control characters such as tab or carriage return. Encoders can switch subsets inside a single barcode, so you rarely need to choose one by hand.

Character set: Upper-case A-Z, digits, punctuation and ASCII control characters (00-95)

Example: ABC123

Part of Code 128 (Computer Identics, 1981)

Code 128B

Code 128 has three character sets, and subset B covers normal printable text in upper and lower case, which is why it is the default for most data. Encoders can switch subsets inside a single barcode, so you rarely need to choose one by hand.

Character set: Upper- and lower-case letters, digits and punctuation (ASCII 32-127)

Example: ABCxyz123

Part of Code 128 (Computer Identics, 1981)

Code 128C

Code 128 has three character sets, and subset C encodes two digits in every symbol character, roughly halving the width of long numbers. Encoders can switch subsets inside a single barcode, so you rarely need to choose one by hand.

Character set: Digit pairs 00-99 (numeric only, two digits per symbol character)

Example: 123456

Part of Code 128 (Computer Identics, 1981)

Related codes

Questions

What is the difference between Code 128 A, B and C?

A, B, and C are character sets inside one Code 128 symbol, not three barcodes. Set A has uppercase letters, digits, punctuation, and control characters. Set B has upper and lower case. Set C stores digits in pairs. The camera app can scan this. The Zebra app can scan this. Both show it as Code 128 and do not name the set.

How is the Code 128 check digit calculated?

Every Code 128 symbol includes a modulo 103 check character inside the bar pattern. The camera app returns the message. It does not add the check character to the text.

Can I scan Code 128 barcodes with my phone?

Yes. The camera app can scan this, and the Zebra app can scan this. The result is the raw message. The app does not split GS1 application identifiers. A GS1-128 label uses this same pattern and still shows up as Code 128.