By the VixQR team · published on · 5 min read
Code 128 Barcode: Read the Format Before You Print the Label
Learn what a Code 128 barcode stores, how GS1-128 adds data rules, and what to verify before printing or accepting a scanned inventory label.

AI-generated 3D illustration. Decorative stripe patterns are not intended for scanning.
TL;DR: A Code 128 barcode is a one-dimensional symbol that represents data using bars and spaces. GS1-128 uses Code 128 with additional identification and data-format rules, so an ordinary Code 128 label is not automatically a valid GS1 label. Check both the decoded string and the receiving application before printing a batch.
What is a Code 128 barcode?
A Code 128 barcode encodes a character string in a linear pattern rather than a square matrix. ASCII is a character system covering letters, digits, punctuation and control characters; Code 128 supports that character repertoire through code sets. The symbol describes how data is represented, while the application decides what the decoded data means.
The Zint barcode project's manual, section 6.1.10.1, documents three code sets, A, B and C, automatic switching and a modulo-103 check character. That check supports error detection; it does not authenticate a product or encrypt its identifier. A successful decode alone cannot establish that an inventory record is correct.
| Layer | Question to answer |
|---|---|
| Symbol | Is the label encoded as Code 128? |
| Data | Does the decoded string exactly match the intended value? |
| Application | Does the receiving system recognize that value and its meaning? |
How is Code 128 different from GS1-128?
GS1-128 adds GS1 identification and data rules to Code 128. According to GS1's format guidance, FNC1 follows the start character, and the data contains an Application Identifier followed by its data field. An Application Identifier tells software how to interpret the following field.
Typing text that looks like a GS1 label into a general barcode generator is therefore insufficient. The encoder must support the required GS1 mode, and the data must satisfy the applicable GS1 rules. GS1 US describes GS1-128 as a subset of Code 128; the relationship does not make the names interchangeable.
- Confirm whether the recipient requests ordinary Code 128 or GS1-128.
- Check the decoded fields in the receiving software, not just in a text box.

What do code sets A, B and C change?
Code sets change the encoding choices inside Code 128, rather than creating three unrelated barcode families. Zint automatically switches between A, B and C to encode suitable input efficiently. For an ordinary identifier, use an encoder that handles those choices instead of constructing a symbol by styling unprocessed text with a barcode font.
A hypothetical internal identifier such as BIN-A7 illustrates the distinction between data and presentation. The identifier is a made-up example, not a registered product number or a tested label. Your check is whether the scanner returns exactly the intended string, including punctuation, case and any leading zeros required by the system.
| Check | Why it matters |
|---|---|
| Leading zeros | A spreadsheet may treat an identifier as a number |
| Letter case | The receiving system may distinguish identifiers by case |
| Separators | Spaces or punctuation can change the stored value |
| Scanner suffix | A configured Enter or Tab can affect the destination field |
Why can a readable barcode still fail in an application?
A readable barcode can fail because the application expects different data or a different symbology. Separate an optical problem, where the reader cannot decode the label, from a data problem, where a decoded value is rejected. This distinction prevents repeatedly changing print size when the actual issue is an unexpected field format.
Keep the original file and a sample print while investigating. Try the reader and application that will actually receive the label, and compare the returned value against the source record. A phone camera or unrelated scanner app is a separate compatibility check, not a substitute for the intended workflow or formal barcode verification.
- Confirm that the reader supports and enables Code 128.
- Scan a sample made with the intended printer and material.
- Inspect the complete returned string in an appropriate test field.
- Check the same sample in the destination application.
- Resolve errors before printing the remaining labels.
When should you compare Code 128 with a QR code?
Compare Code 128 with a QR code when the reader, payload or user action is still undecided. The choice should follow the receiving workflow, rather than an assumption that every barcode opens a website. Our QR code versus barcode guide explains the broader comparison, while the PDF417 guide covers a stacked format.
- Start with the required data and destination system.
- Identify whether users have a dedicated reader or a phone workflow.
- Test actual output before distributing labels.
What else should you know about Code 128?
Is Code 128 the same as GS1-128?
No. GS1-128 uses Code 128 with FNC1 and GS1 data rules; an ordinary Code 128 symbol does not acquire those rules just because its text looks similar.
Does Code 128 protect confidential information?
The barcode format does not provide confidentiality. Treat its payload according to who can see or scan the printed label.
Can I identify the exact data from the bars by eye?
Use a compatible decoder to read the data. A decorative illustration or a visual resemblance cannot confirm a valid encoded value.
Should I test only the digital image?
Test a physical sample if the final label will be printed. Printing and the receiving workflow introduce conditions that a digital preview does not check.
What should you check before approving a label?
Approve a Code 128 label only after its decoded data and intended application both work as expected. Keep GS1-128 requirements separate from ordinary Code 128 encoding, and retain a sample before batch printing. Visit the VIXQR blog for related format and scanning guides.