Code 128
Code 128 is a high-density 1D barcode that represents data through bar and space combinations, using multiple code sets (A, B, C) to efficiently encode characters and digits.
Basic Principle
Code 128 uses different code sets to represent characters. Code Set A covers uppercase letters and control characters, Code Set B covers upper and lower case letters and common symbols, and Code Set C is used for high-density encoding of paired digits. Switching code sets allows Code 128 to express more data within limited width.
Character Range
Code 128 supports the full ASCII character set (0–127), including digits, upper and lower case letters, punctuation and control characters.
Data Density
Compared with Code 39, Code 128 usually occupies less width for the same amount of data, making it a high-density 1D barcode. For digit-heavy content, Code Set C can further improve density.
Common Use Cases
- Shipping labels and parcel sorting
- E-commerce order and warehouse location labels
- Manufacturing material and work order codes
Key Differences from Code 39
Code 128 has higher density and a more complete character set; Code 39 is simpler and more tolerant of print precision, but has a limited character set and produces longer barcodes. Choice depends on data length, printing equipment and scanning environment.
Back to the online barcode tool section →
Code 39
Code 39 is a simple, easy-to-generate and easy-to-read 1D barcode using fixed-width bar and space combinations to represent characters, common in industrial and warehouse scenarios.
Encoding Characteristics
Each Code 39 character consists of 5 bars and 4 spaces (9 elements total), 3 of which are wide. Characters are separated by narrow spaces. The simple structural rules provide good print tolerance.
Character Range
Standard Code 39 supports digits 0–9, uppercase letters A–Z and a few special symbols (such as -, ., space, $, /, +, %). To represent lowercase letters or other characters, an extended mode is usually required, increasing barcode length.
Industrial and Warehousing Applications
- Industrial part numbers and asset labels
- Warehouse location and pallet labels
- Internal work order and batch tracking
Notes on Use
Code 39 barcodes are relatively long, so evaluate label space. The character set is limited; if data contains lowercase letters or special characters, confirm whether extended mode is enabled. Ensure sufficient quiet zones and contrast when printing.
Back to the online barcode tool section →
QR Code
QR Code is a 2D matrix barcode that encodes data in both horizontal and vertical directions, offering large capacity and strong error correction.
2D vs 1D Barcodes
1D barcodes encode only horizontally with limited capacity. QR Code arranges modules in a 2D plane, can represent more data, and can still be read correctly under some damage through error correction.
2D Data Encoding
QR Code encodes data into a binary bit stream, then maps it into a black-and-white module matrix. The matrix contains finder patterns, alignment patterns, format information and data areas. Scanners use finder patterns to determine orientation and boundaries.
Error Correction Basics
QR Code offers different error correction levels (commonly L, M, Q, H). Higher levels tolerate more damage but require more modules for the same data. Choosing a level is a trade-off between capacity and robustness.
Common Use Cases
- URLs, payments and electronic tickets
- Product traceability and anti-counterfeiting
- Device configuration and information display
Scanning Requirements
QR Code requires sufficient print precision, reasonable module size and quiet zones. When displayed on screens, avoid glare and excessive scaling to ensure clear module boundaries.
Back to the online barcode tool section →
Comparison Table
The table below compares the three barcode types by dimension, capacity characteristics, common applications and suitable scenarios.
| Type |
1D / 2D |
Capacity |
Common Applications |
Suitable Scenarios |
| Code 128 |
1D |
High density, full ASCII support |
Shipping labels, e-commerce orders, warehouse locations |
1D scenarios with longer data and limited print space |
| Code 39 |
1D |
Lower density, limited character set |
Industrial parts, asset labels, internal work orders |
Scenarios requiring simple structure and print tolerance |
| QR Code |
2D |
Large capacity with multi-level error correction |
URLs, payments, product traceability |
Scenarios needing more data or complex environments |
Note: This page only introduces barcode types and encoding characteristics. Actual barcode generation is not yet implemented on this website; the homepage form is a UI placeholder. For generation, refer to specific barcode standards and professional tools.
Continue to Barcode Knowledge →