iCheck QR LogoiCheck QR Logo

What is Code 128? A Complete Guide to Its Structure, Creation, and Applications

Knowledge
March 7, 2025 - 5:32 PM
Compartir:

In the era of digital transformation and intelligent supply chains, barcode usage is no longer optional—it has become a mandatory standard for all businesses.

Among the most widely used barcode types today, Code 128 stands out for its comprehensive encoding capability, flexibility, and high performance. Designed to encode the full ASCII character set, Code 128 not only meets the needs of complex data processing but also optimizes print space and enhances scanning speed.

In this article, iCheckQR will help you explore everything about Code 128—from its technical structure and quick generation methods using common tools (Excel, Word, iCheckQR), to its real-world applications in shipping, inventory management, and integration with modern technologies such as RFID and blockchain. This is a must-read guide to mastering Code 128 barcodes and improving operational efficiency in your business.


1. What is Code 128? Understanding Its Structure and Encoding Principles

Definition and History of Code 128

Code 128 is a high-density linear (1D) barcode designed to encode all 128 ASCII characters.

It was developed in 1981 by Computer Identics Corporation, with contributions from Ted Williams, aiming to create a more flexible and efficient barcode system for automatic identification in industrial and logistics sectors.

Today, Code 128 is standardized under ISO/IEC 15417:2007, ensuring consistency and compatibility in global applications.

Technical Structure of Code 128

The Code 128 barcode consists of the following main components:

  • Start Code (A/B/C): Defines the initial character set being used.

  • Code Set A: Includes ASCII characters 00–95, covering uppercase letters, numbers, and control characters.

  • Code Set B: Includes ASCII characters 32–127, covering uppercase and lowercase letters, and numbers.

  • Code Set C: Optimized for numeric data, encodes number pairs from 00 to 99.

  • Data: The character string to be encoded, which can switch between code sets A, B, and C within a single barcode to optimize length and encoding efficiency.

  • Checksum: A calculated character based on the entire data set, used to detect errors during scanning and decoding.

  • Stop Code: The ending character that signals the scanner the barcode has finished.

Illustration: Structure of a Code 128 barcode


Code 128 is highly regarded for its flexible and efficient encoding capabilities—especially useful in applications requiring complex or large-scale data encoding, such as supply chain management, shipping, and logistics. Understanding its structure and encoding logic is essential for effective implementation in automated identification systems.

2. Advantages, Disadvantages, and Real-World Applications of Code 128

Advantages and Disadvantages Compared to Other Barcode Types

Criteria

Code 128

Code 39

EAN-13

Character Support

Full 128 ASCII characters (uppercase, lowercase, numbers, special characters)

43 characters (uppercase A–Z, digits 0–9, some symbols)

13 digits (numeric only)

Data Capacity

High (high data density, efficient encoding)

Medium (each character takes more space)

Low (numeric only, no character support)

Barcode Size

Smaller than Code 39 (due to higher data density)

Larger (each character consumes more space)

Medium (optimized for numeric encoding)

Scanning Speed

Fast (shorter and easier to read barcodes)

Medium (longer barcode, more prone to scanning errors)

Medium (suitable for retail systems)

Checklist: When Should You Use Code 128?

  • International Shipping: Encode detailed information on shipping labels.

  • Logistics & Warehousing: Manage goods, pallets, and shipments efficiently.

  • ERP/WMS Systems: Integrate barcodes into enterprise resource planning or warehouse management software.

  • Products with Complex Data: Encode batch numbers, expiration dates, supplier codes, etc.

Real-World Applications of Code 128

  • Shipping & Logistics: Widely used on shipping labels to encode tracking numbers, delivery addresses, and shipment details.

  • Inventory & ERP Management: Integration with ERP systems allows for real-time inventory tracking, shipment management, and streamlined warehouse operations.

  • Manufacturing & Quality Control: Encodes product data such as batch numbers, production dates, and quality inspection information.


3. How to Register and Generate Code 128 Barcodes for Businesses

Registration Process and Barcode Issuance from GS1 (If Required)

To use internationally standardized barcodes, businesses in Vietnam must register with GS1 Vietnam by following these steps:

Step 1: Prepare Required Documents

  • Application form for the use of barcodes, following the GS1-provided template.

  • A notarized copy of the Business Registration Certificate or the Business Establishment Decision.

Step 2: Submit the Application

  • Submit documents either in person or by post to the National Center for Numbering and Barcodes (GS1 Vietnam) at: No. 8 Hoang Quoc Viet Street, Cau Giay District, Hanoi.

  • Alternatively, submit online via the GS1 Vietnam portal: https://vnpc.gs1.org.vn

Step 3: Receive GS1 Company Prefix

Once the application is approved, the business will receive its GS1 Company Prefix.

This prefix is then used to generate GTINs (Global Trade Item Numbers) and integrate barcode data into the business’s product and inventory management systems.


How to Create Code 128 Barcodes with Excel and Word (Quick Method)

Businesses can quickly generate Code 128 barcodes using Microsoft Excel or Word by following these simple steps:

Step 1: Download and Install Barcode Font

  • Download a Code 128 barcode font from a reputable source.

  • Extract the font file and install it by right-clicking the file and selecting “Install.”

Step 2: Enter Data in Excel or Word

  • Open Excel or Word and type the string of characters you want to encode.

  • Note: When using a Code 128 font, you do not need to add special start or stop characters manually.

Step 3: Format the Text

  • Highlight the entered text.

  • Apply the newly installed Code 128 font to convert the string into a barcode.

  • Adjust the font size to ensure the barcode is clearly displayed and scannable.


4. Integrating Code 128 with Management Systems and Technology Solutions

Integration with POS, ERP, and WMS Software

Code 128 barcodes, with their versatile encoding capabilities and high data density, are widely used across various management systems:

  • POS (Point of Sale): Enables fast product scanning at checkout counters, reducing transaction time and minimizing input errors.

  • ERP (Enterprise Resource Planning): Barcode integration helps synchronize data across departments—from warehousing to accounting—enhancing overall operational efficiency.

  • WMS (Warehouse Management System): Barcodes are used to track the location, quantity, and status of inventory in the warehouse, optimizing storage and inbound/outbound processes.

This integration not only automates workflows and reduces manual input errors but also provides accurate and timely data to support better decision-making.

Advanced Solutions: Combining RFID, QR Codes, and Blockchain

To enhance traceability and prevent counterfeiting, many businesses are adopting hybrid solutions that integrate barcodes with advanced technologies:

  • RFID (Radio Frequency Identification): Allows for remote identification and tracking of products without the need for direct scanning—ideal for high-volume warehouse environments.

  • QR Code: Encodes detailed product information, enabling consumers to quickly access data via smartphones.

  • Blockchain: Stores product data in a transparent and immutable way, ensuring authenticity and preventing fraud within the supply chain.

This technological synergy creates a comprehensive management system—from manufacturing to end-user—strengthening customer trust and meeting stringent traceability requirements.


5. Frequently Asked Questions About Code 128

What characters does Code 128 support?

Code 128 barcodes support the full range of 128 standard ASCII characters (codes 0 to 127), including:

  • Uppercase letters (A–Z)

  • Lowercase letters (a–z)

  • Numbers (0–9)

  • Special characters (e.g., !, @, #, $, %, &, *)

  • Control characters (such as TAB, CR, LF)

In addition, Code 128 also supports extended ASCII characters (128–255) via the FNC4 (Function 4) character, allowing encoding of characters from the ISO/IEC 8859-1 (Latin-1) character set.

How can I optimize the barcode length?

To shorten the barcode length when encoding long data strings, you can:

  • Use Code Set C: Encodes numeric pairs (00–99) using a single character, significantly reducing barcode length when processing long numeric sequences.

  • Switch between Code Sets A, B, and C: Depending on the type of data (letters, numbers, special characters), switching between code sets helps optimize encoding and minimize barcode size.

  • Use barcode generation software with "Auto" mode: These tools automatically select the most efficient code set for encoding your data.

Does Code 128 require licensing or royalty fees?

No. Code 128 is a royalty-free barcode standard and does not require a license for use.

You can generate and use Code 128 in commercial applications without paying any license fees.

Many providers, such as IDAutomation, offer free Code 128 fonts and barcode generators for both personal and commercial use.

Conclusion

Code 128 is not just a powerful barcode standard—it’s a strategic solution for modern businesses. With its flexible encoding capabilities, high accuracy, and seamless integration with systems like POS, ERP, and WMS, Code 128 has proven its value across inventory management, logistics, and supply chain operations.

This article has provided you with a comprehensive understanding—from theory to practice—covering everything from GS1 registration to creating barcodes using Excel, Word, or iCheckQR. When combined with emerging technologies like QR codes, RFID, and blockchain, Code 128 becomes a central component in transparent, accurate, and anti-counterfeit management systems.

Start using Code 128 today to standardize your workflows and build a long-term competitive advantage for your business.

Última actualización: November 14, 2025 - 11:03 AM

iCheckQR Team

iCheckQR Team

Contenido compilado por el equipo de iCheckQR, especializado en codificación, códigos QR y aplicaciones de productos digitales. Estamos comprometidos a proporcionar información precisa, fácil de entender y útil adaptada a las necesidades de implementación práctica de los usuarios.

Haz un código QR para tu uso diario.

También te puede interesar