Ads block

Code-128

 What does 128 mean in code?
CODE 128 is the barcode developed by Computer Identics Corporation (U.S.A.) in 1981. CODE 128 can represent all 128 ASCII code characters (numbers, upper case/lower case letters, symbols and control codes).
Code 128 Generating Free Website Barcode Bro with all types of Labels with Barcode Lable Guru
ASCII : American Standard Code for Information Interchange.
ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices.
ASCII is a 7-bit character set containing 128 characters. It contains the numbers from 0-9, the upper and lower case English letters from A to Z, and some special characters. The character sets used in modern computers, in HTML, and on the Internet, are all based on ASCII.
1. Numbers 0-9 = 10
2. Upper Case English Letters A to Z = 26
3. Lower Case English Letters a to z = 26
4. Special Characters = 66
Code 128 Generating Free Website Barcode Bro with all types of Labels with Barcode Lable Guru
Fugure Showing Characters Chart can be used in Code-128 Barcode Image Generation
Site Barcode Bro Generates Barcode Code-128 Free for Nay User.

What is Code 128 used for?
Code 128 is a high density, alphanumeric barcode commonly used for, but not limited to, shipping labels, ID cards, USPS applications, and some medical applications. It is able to encode upper and lower case letter, numbers, numerous symbols, control characters, and special functions.

What is Code 128?
Code 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and, by use of an extension symbol (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1.
                             Why is idautomation Code 128 a complex barcode?

How a Code 128 barcode is generated?
How to create a Code-128 barcode A, B, C (.NET, VCL) - Fast ...
The Code-128 barcode contains 107 characters,103 of them are data characters, 3 start, and 1 stop character. To encode all 128 ASCII characters, there are three sets of Code128 barcode characters - A, B and C, which can be used within a single barcode.

The Code 128 barcode may be complex to use because of the different character sets, which is the primary reason IDAutomation provides the Code 128 auto function, “Code128 ( )”, in several of the Font Tools, Components and Applications.

Code 128 vs UPC / EAN
UPC and EAN will only encode numbers while Code 128 can also encode letters (large cap and small cap) and a variety of special characters. In addition, EAN and UPC are fixed length codes: They only encode exactly twelve (UPC-A, GTIN-12) or thirteen (EAN 13, GTIN-13) digits. For more about EAN, see EAN 13 Explained.

Amazon FBA Barcodes (ASIN, FNSKU)
With FBA (Fulfillment by Amazon), two different types of barcodes are used:

Retail barcodes (EAN, UPC, ISBN) are used for new (i.e. unused) products and are the standard way of labelling products for which you are either a reseller, the manufacturer or brand owner and that are shipped via Amazon fulfillment. Those barcodes are called "Manufacturer barcodes" in Amazon speak.

Amazon says: "When more than one seller has inventory with the same manufacturer barcode, Amazon may fulfill orders with the inventory that is closest to the customer, for faster delivery." This is called commingling. Commingling has implications when items are returned, if there is a warranty claim and with regard to VAT (in Europe) or sales tax (in the US).

FBA products without an EAN / UPC / ISBN code or items that are used or perishable are labelled with an "Amazon barcode". This is a unique Code 128 barcode that encodes either the product's ASIN or its FNSKU (for Fulfillment Network Stock Keeping Unit). The FNSKUs link a product to a seller and are preferrable if one wants to avoid commingling. FNSKUs are automatically assigned once a product is listed by a seller; the respective barcode labels can be printed directly from the seller's dashboard or downloaded as PDF for later printing.
Here's an example of an FNSKU label on a product package
Code 128 Generating Free Website Barcode Bro with all types of Labels with Barcode Lable Guru
                      
Why is Code 128 better than ITF?
When CODE-C is used as the start character, one bar pattern can represent 2-digits numbers. This allows very efficient barcode composition. If the barcode data has 12 or more digits, CODE 128 provides smaller size than ITF. Since CODE 128 uses 4 types of bar size, printers with high print quality are required.
   
What is the Code 128 type?
linear barcode symbology
Code 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and, by use of an extension symbol (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1..

How many characters can a barcode encode?
It can encode all 128 characters of ASCII and, by use of an extension symbol (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1. [citation needed]. It generally results in more compact barcodes compared to other methods like Code 39, especially when the texts contain mostly digits.
A Code 128 barcode has seven sections:

Code 128 maximum length
Code 128 is a variable length code, which in principle can encode an arbitrary length of data. The practical content limit for Code 128 is at 30 characters (large cap and small cap letters) or a maximum of 60 digits (purely numeric code).

Quiet zone
Start symbol
Encoded data
Check symbol (mandatory)
Stop symbol
Final bar (often considered part of the stop symbol)
Quiet zone

Subtype
Code 128 includes 108 symbols: 103 data symbols, 3 start symbols, and 2 stop symbols. Each symbol consists of three black bars and three white spaces of varying widths. All widths are multiples of a basic "module". Each bar and space is 1 to 4 modules wide, and the symbols are fixed width: the sum of the widths of the three black bars and three white bars is 11 modules.

The stop pattern is composed of two overlapped symbols and has four bars. The stop pattern permits bidirectional scanning. When the stop pattern is read left-to-right (the usual case), the stop symbol (followed by a 2-module bar) is recognized. When the stop pattern is read right-to-left, the reverse stop symbol (followed by a 2-module bar) is recognized. A scanner seeing the reverse stop symbol then knows it must skip the 2-module bar and read the rest of the barcode in reverse.
 Code 128 at a Glance
Type: Linear barcode symbology
Applications: Warehousing, transport, logistics, retail
Character set: Encodes all 128 characters from ASCII set
Modes: Control characters, alphanumeric, numeric compaction
Check digit: Modulo 103 (not mandatory but recommended)
Generators: Stand-alone, barcode fonts, barcode extensions
Scanning: CCD / Laser scanners, imagers, scanner apps
Printing: Thermal direct, thermal transfer, laser, inkjet, dot-matrix
Code 128 Generating Free Website Barcode Bro with all types of Labels with Barcode Lable Guru

The code set to use is indicated to the scanner by the start symbol or start character. Also available are various mode switching or shift characters to switch from one set to another within a barcode symbol. Usually the sub type selection and switching within a symbol is handled by the barcode software that creates the code.

For reference we are including the bar patterns of the three start- and the single stop-character here. When using a Code 128 barcode font in Excel or similar applications, the start and stop characters will be mapped to certain character positions; however, the mapping is not standardized and will vary from font to font.

Code 128 Auto refers to the automatic selection of the 128 subtype depending on the encoded data. This is performed by the respective barcode software to minimize the size of the code. Code 128 Auto is not a separate version or subset of the code.

In principle non-ASCII characters like German umlauts (e.g. "Ä Ö Ü") or accented characters (e.g. "á ñ ò") can be encoded in a Code 128 symbol by using a special character (FNC4), defined for Code 128 A and Code 128 B. However, this feature is not widely supported and cumbersome to use. Using a 2D barcode symbology like QR or Data Matrix with dedicated support for non-ASCII or Unicode data might be a better choice.

The barcode software that generates the code will usually calculate the check digit automatically. The check digit can be any character from the code set, including non-printable characters like TAB or EOT. It is therefore not common to append the check character to the readable text under the code, likewise it is usually not transmitted by the scanner with the encoded data

Another popular choice to encode alphanumeric characters is Code 39. The biggest advantages of Code 39 is that it can be used without a check digit. On the negative side, the barcode will only natively encode capital characters ("ABC"); small caps ("abc") can be encoded with Code 39 Extended but this code can get very large, as the following example illustrates

Code 128 is a good choice for embedding barcodes in your spreadsheet. Applications include catalogs with article numbers, serial numbers or GS1 data points like GTIN or best-before dates. The easiest and most straight forward way of creating Code 128 barcodes in Excel or Google Sheets is with a Code 128 barcode font. 

Manually decoding Code 128 is possible, beginning with the start symbol and going forward one character or pair of digits at a time. A Code 128 decoder will also have to take mode switching and shift characters into account. Finally, the validity of the decoded data has to be verified against the Modulo 103 check digit.

It is safe to assume that all barcode scanners available today will read Code 128 barcodes. However, there are some pitfalls and caveats when scanning Code 128; see here if you have a Code 128 symbol that can not be scanned.


With modern smartphones, dedicated apps can be used to scan barcodes like Code 128. Screenshot shows the CoScan app, a PDF and barcode scanner for iPhone that supports all common linear and 2D barcode types. 

The Code 128 barcode is a high-density linear symbology that encodes text, numbers, numerous functions and the entire 128 ASCII character set  It is commonly used for several implementations; and is also referred to as ISBT-128, GS1-128, UCC-128, EAN-128 and USS Code 128.

Code 128 contains 106 different printed barcode patterns. Each printed barcode may have one of three different meanings depending upon which of the character sets are being used, with the availability of three different Code 128 start characters to program the initial character set. Functions are also provided in the barcode symbology to switch between character sets and encode Application Identifiers. The Code 128 barcode may be complex to use because of the different character sets, which is the primary reason IDAutomation provides the Code 128 auto function, “Code128( )”, in several of the Font Tools, Components, and Applications.

IDAutomation provides several font tools, plug-ins, and source code samples that are free to use with IDAutomation barcode fonts, which will automatically format the start, stop and check characters to the barcode fonts. Therefore, the manual calculations described here are rarely necessary.

The following examples create a barcode with the IDAutomation Code 128 Barcode Fonts in the Latin-1 codepage, which is the default setting in the USA. When the Latin-1 codepage is not being used, or when using a Mac, it is suggested to use the Universal Barcode Font Advantage™, which creates the Code 128 barcode as a font in any codepage and operating system.

Code 128 Auto can encode the complete ASCII-character set. This is done by switching between all 3 character sets of Code 128:
Code 128A: Includes upper case letters and control characters.
Code 128B: Includes upper and lower case letters.
Code 128C: Specially optimized for numbers.

Code128 specifies a combination of 6 alternating bars and spaces (3 of each) for each symbol. Thus, each symbol begins with a bar and ends with a space. In barcode fonts, the final bar is generally combined with the stop symbol to make a wider stop pattern. The following table details the widths associated with each bar and space for each symbol. The width of each bar or space may be 1, 2, 3 or 4 units (modules). Using the example above, an 'A' would be depicted with the pattern 10100011000, or as widths 111323 in the tables below.


The widths value is derived by counting the length of each run of 1's then 0's in the pattern, starting from the left. There will always be 6 runs and the lengths of these 6 runs form the Widths value. For example, using the pattern 10100011000, the run lengths are 1 (digit 1), 1 (digit 0), 1 (digit 1), 3 (digit 0), 2 (digit 1), 3 (digit 0). Reporting just the lengths of each run gives 1, 1, 1, 3, 2, 3, thereby producing a widths value of 111323.

Code 128 barcodes may be generated by either an outside application to create an image of the barcode, or by a font-based barcode solution. Either solution requires the use of an application or an application add in to calculate the check digit and create the barcode.

Code 128 includes 108 symbols: 103 data symbols, 3 start symbols, and 2 stop symbols. Each symbol consists of three black bars and three white spaces of varying widths. All widths are multiples of a basic "module". Each bar and space is 1 to 4 modules wide, and the symbols are fixed width: the sum of the widths of the three black bars and three white bars is 11 modules.

The stop pattern is composed of two overlapped symbols and has four bars. The stop pattern permits bidirectional scanning. When the stop pattern is read left-to-right (the usual case), the stop symbol (followed by a 2-module bar) is recognized. When the stop pattern is read right-to-left, the reverse stop symbol (followed by a 2-module bar) is recognized. A scanner seeing the reverse stop symbol then knows it must skip the 2-module bar and read the rest of the barcode in reverse.


Despite its name, Code 128 does not have 128 distinct symbols, so it cannot represent 128 code points directly. To represent all 128 ASCII values, it shifts among three code sets (A, B, C). Together, code sets A and B cover all 128 ASCII characters. Code set C is used to efficiently encode digit strings. The initial subset is selected by using the appropriate start symbol. Within each code set, some of the 103 data code points are reserved for shifting to one of the other two code sets.

128A (Code Set A) – ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4
128B (Code Set B) – ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4
128C (Code Set C) – 00–99 (encodes two digits with a single code point) and FNC1
The minimum width of the quiet zone to the left and right of the Code 128 is 10x, where x is the minimum width of a module. It is mandatory at the left and right side of the barcode

Each symbol in the barcode is composed of three bars and three spaces. Each bar or space is 1, 2, 3 or 4 units wide, the sum of the widths of bars must be even (4, 6 or 8 units), the sum of the widths of the spaces must be odd (3, 5 or 7 units), and total 11 units per symbol. For instance, encoding the ASCII character "0" can be viewed as 10011101100, where a sequence of 1's is a bar and a sequence of 0's is a space. A single 1 would be the thinnest line in the bar code. Three 1's in sequence (111) indicates a bar three times as thick as a single 1 bar.