Code 128 Barcode Scanner
Add Code 128 barcode scanning to your mobile application or website
Trusted by 300+ global
industry leaders
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.


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 barcodes
What is Code 128?
Code 128 is a one-dimensional barcode format that encodes all 128 standard ASCII symbols, including uppercase and lowercase letters, numeric digits, and special characters. It is standardized in ISO/IEC 15417 and features three character subsets (A, B, and C), each optimized for a specific data type.
Code 128 offers high density and flexibility. Each symbol can represent a large amount of information in a small space. It is ideal for logistics, warehousing, and other applications that require compact, variable-length barcodes.
GS1-128 barcodes combine the Code 128 symbology with GS1 application identifiers.
Structure and components
Code 128 barcodes consist of the following key components:
- Quiet zones: Blank areas on both sides of the barcode that ensure proper detection and readability.
- 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.
- Data characters: 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 switches between sets A, B, and C for optimal efficiency.
- Check character: A mandatory verification element calculated using a weighted modulo-103 checksum. It ensures data integrity by providing error detection.
- Stop character: A distinct 13-module pattern (4 bars and 3 spaces) that marks the barcode’s end.
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. Code 128 in fact consists of 108 symbols (103 data symbols, 3 start symbols, and 2 stop symbols).
The table below shows which code set supports which characters (excluding the barcode’s function codes):
Character set | Character coverage |
Code Set A | ASCII 0-95: Digits (0-9), uppercase letters (A-Z), punctuation marks, seven special characters, and control codes. |
Code set B | ASCII 32-127: Digits (0-9), upper- and lowercase letters (A-Z, a-z), punctuation marks, and seven special characters. |
Code set C | Numeric pairs from 00 to 99, plus three special characters. Each character represents two digits. |
Error detection
Code 128 provides error detection through a modulo 103 check digit, which is added before the stop symbol. Here’s how it works:
- The scanner reads the encoded data and calculates a checksum.
- This is compared with the check digit in the barcode.
- If both check digits match, the data is considered valid.
- If they don’t match, the scan is rejected as an error.
While Code 128 allows scanners to detect errors effectively, it does not have built-in error correction capabilities.
Applications of Code 128 barcodes
Logistics and shipping
Code 128 barcodes are widely used for real-time package tracking and automated sorting in shipping operations across global supply chains.
Inventory management
Code 128 barcodes simplify inventory management by encoding comprehensive product data, including serial numbers, batch codes, and production dates.
Manufacturing
In production environments, Code 128 is used to ensure accurate component tracking and assembly verification while maintaining complete product traceability.
Healthcare
Healthcare facilities employ Code 128 for patient safety systems. The symbology allows precise tracking of medication, medical equipment, lab 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.
- Simple printing: Barcodes can be created using regular printers, rather than requiring specialized equipment, unlike older barcode formats which need thermal printers for reliable scanning.
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:
- Data Matrix Scanner
- QR Code Scanner
- PDF417 Scanner
- Aztec Code Scanner
- Code 39 Scanner
- EAN Scanner
- UPC Scanner
- Micro QR Code Scanner
- GS1 DataBar Scanner
- GS1 DataMatrix Scanner
- GS1-128 Scanner
- MaxiCode Scanner
- ITF Scanner
- Codabar Scanner
- Intelligent Mail Barcode Scanner
- rMQR Code Scanner
- Royal Mail Scanner
- Micro PDF417 Scanner
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.