Skip to content

Code 128 Barcode Scanner

Add Code 128 barcode scanning to your mobile application or website

Trusted by 300+ global
industry leaders

Generali Success Story Deutsche Telekom Case Study Deutsche Bahn Success Story AXA Success Story Generali Success Story Deutsche Telekom Case Study Deutsche Bahn Success Story AXA Success Story

Turn smartphones into fast & reliable Code 128 scanners

The Scanbot Code 128 Scanner delivers exceptional performance, enabling users to quickly decode barcodes in a small space or even scan damaged barcodes. With a scanning speed of under 0.04 seconds, your app users will benefit from seamless workflows.

Key benefits include:

  • Offline scanning: The Scanbot SDK works 100% on-device, ensuring both uninterrupted performance and data security.
  • Enterprise-grade support: Get dedicated chat support via Slack, Teams or email for any issue. Includes free assistance during the integration phase.
  • Flat pricing model: Cost stays the same no matter how much your user base or scanning volume grows.
Code 128 barcode scanner
Code 128 scanner

How this scanning tool works

Our free online Code 128 barcode reader scans codes directly through your camera or on imported images. This barcode scanner works in any browser, no app download or signup needed. Enjoy real-time camera view scanning or decode barcodes on pictures in seconds – just point your camera at the Code 128 barcode or import an image file to instantly access the encoded data.

This tool is powered by the Scanbot Barcode Scanner SDK!


(We don’t store any images or data you import. Everything stays on your device.)

Understanding Code 128 barodes

What is a Code 128?

 

Code 128 is a one-dimensional barcode format that encodes all 128 standard ASCII symbols, including uppercase and lower case letters, numeric digits, and special characters. It is defined in the ISO/IEC 15417:2007 standard and features three subsets (A, B, and C), each optimized for specific data types.

 

With its high density and flexibility, Code 128 can represent a large amount of information in a small space. It is ideal for logistics, warehousing, and other applications requiring compact and efficient barcodes.

 

Structure and components

 

Code 128 barcodes consist of the following key components:

 

  1. Quiet zones: Blank areas on both sides of the barcode that ensure proper scanning and readability.
  2. Start character: A unique 11-module pattern (3 bars and 3 spaces) that indicates which character set (A, B, or C) will be initially used.
  3. Data character: The main content section where information is encoded. Each character consists of 11 modules (3 bars and 3 spaces). Code 128 encodes all 128 ASCII characters and automatically switches between sets A, B, and C for optimal efficiency.
  4. Check character: A mandatory verification element calculated using a weighted modulo-103 checksum. It ensures data integrity by providing error detection.
  5. Stop character: A distinct 13-module pattern (4 bars and 3 spaces) that marks the barcode’s end.

 

Code 128 elements

 

Code 128 consists of 108 symbols (103 data symbols, 3 start symbols, and 2 stop symbols) that shift between three character sets (A, B, and C) to encode data efficiently. Despite its name, it doesn’t contain 128 distinct symbols – instead, it achieves full ASCII coverage by switching between sets A and B, while set C specializes in encoding digit strings efficiently.

 

The table below shows what code set supports what characters:

 

Character set Character coverage
Code Set A Digits (0-9), upper case letters (A-Z), punctuation marks, seven special characters, and control codes (ASCII 00-95).
Code set B Digits (0-9), upper case and lower case letters (A-Z, a-z), punctuation marks, and seven special characters (ASCII 32-127).
Code set C Numeric pairs from 00 to 99, plus three special characters. Each character represents two digits.

 

Error detection

 

Code 128 uses mandatory error detection through a Modulo 103 check digit, but cannot correct errors. Here’s how it works:

 

  1. A check digit is calculated from the encoded data
  2. The scanner recalculates this digit during reading
  3. If both check digits match, the data is considered valid
  4. If they don’t match, the scan is rejected as an error

 

While Code 128 is effective at detecting errors, it does not have built-in error correction capabilities.

 

Applications of Code 128 barcodes

 

Logistics and shipping

These barcodes enable real-time package tracking and automated sorting in shipping operations across global supply chains.

 

Inventory management

These barcodes streamline inventory control by encoding comprehensive product data, including serial numbers, batch codes, and production dates.

 

Manufacturing

In production environments, Code 128 ensures accurate component tracking and assembly verification while maintaining complete product traceability.

 

Healthcare

Healthcare facilities rely on Code 128 for patient safety through precise tracking of medications, medical equipment, specimens, and patient records.

 

Advantages of Code 128 barcodes

 

  • High data density: Encodes large amounts of information in a compact format.
  • Full ASCII support: Represents standard ASCII symbols, including uppercase, lowercase, and special characters.
  • Versatile encoding: Efficiently handles numeric, alphanumeric, and control codes through its three subsets.
  • Standard printing: Barcodes can be created using regular printers, avoiding the need for specialized equipment.
  • Durability: Reliable scanning of damaged barcodes ensures functionality in challenging conditions.

 

Why choose the Scanbot SDK for Code 128 barcode scanning?

 

The Scanbot Barcode Scanner SDK is tailored to decode Code 128 barcodes quickly and accurately, even in demanding scenarios.

 

What sets us apart:

 

  • Exceptional performance: Reliably decodes even damaged, low-contrast or distorted barcodes.
  • High-speed scanning: Reads Code 128 barcodes in as little as 0.04 seconds.
  • Cross-platform compatibility: Easily integrate with Android, iOS, cross-platform, web, Windows, and Linux platforms.
  • Customizable UI: Customize the ready-to-use components to match your app or website design.
  • Privacy-first: Operates offline for complete data security.

 

Whether your use case involves Code 128, QR codes, or any other barcode, the Scanbot SDK delivers the accuracy, speed, and reliability you need to succeed.

 


 

Related Barcode Types:

 

Frequently Asked Questions

What is the limitation of Code 128?

Code 128 lacks error correction capabilities, meaning it may face readability issues when the code is obscured or damaged. Apart from that, it uses three different character sets, making encoding more complex.

Should I use Code 39 or Code 128?

The choice depends on your needs. However, Code 128 is generally the better choice due to its higher data density, full ASCII support, and built-in error detection. Code 39 might be preferable in situations requiring extreme simplicity or compatibility with older systems that only support this format.

What is the difference between Code 128 and GS1-128? 

GS1-128 is a specialized variant of Code 128 that uses standardized Application Identifiers (AIs) to encode structured data according to GS1 standards. GS1-128 includes a Function Code 1 (FNC1) character at the start, allowing it to encode multiple pieces of information such as product identification, expiration dates, and batch numbers in a standardized format.