Code 128-C Generator
Generate Code 128-C barcodes from numeric data. Download as PNG or SVG with configurable size, colors, and quiet zones. Free online tool.
About
Code 128-C is the numeric-only subset of the Code 128 symbology defined in ISO/IEC 15417. It encodes digit pairs (00 - 99) into single symbols, achieving roughly double the density of Code 128-A or 128-B for purely numeric data. This makes it the mandatory encoding for GS1-128 application identifiers, SSCC-18 shipping labels, and any logistics context where an odd digit count or a misplaced character causes scanner rejection at the packing line. The checksum is a weighted modulo-103 sum. A single transposition in the input will produce a valid-looking but semantically wrong barcode. This tool computes the check digit, renders the barcode to spec, and flags input errors before they reach a printer.
Limitations: Code 128-C accepts even-length numeric strings only. If your data contains letters or an odd digit count, you need Code 128-A/B or a mixed-mode encoder. The quiet zone on each side must be at least 10 modules wide per ISO/IEC 15417 ยง4.3.2.1. This generator enforces that automatically.
Formulas
The Code 128-C check digit is computed as a weighted modulo-103 sum over all encoded symbol values:
Where vstart = 105 (the fixed Start C symbol value), n is the number of data symbols (digit pairs), i is the 1-based position index, and vi is the numeric value of the i-th digit pair (00 - 99). The resulting C is looked up in the same 103-symbol encoding table and inserted before the Stop pattern.
Total barcode module width: W = 11 ร ( 1 + n + 1 ) + 13 + 2 ร Q, where the first 1 is Start C, the second 1 is the check symbol, 13 is the Stop pattern width, and Q โฅ 10 modules is each quiet zone.
Reference Data
| Value | Digit Pair | Bar Pattern (B S B S B S) | Module Widths |
|---|---|---|---|
| 0 | 00 | 212222 | 11 |
| 1 | 01 | 222122 | 11 |
| 2 | 02 | 222221 | 11 |
| 3 | 03 | 121223 | 11 |
| 4 | 04 | 121322 | 11 |
| 5 | 05 | 131222 | 11 |
| 6 | 06 | 122213 | 11 |
| 7 | 07 | 122312 | 11 |
| 8 | 08 | 132212 | 11 |
| 9 | 09 | 221213 | 11 |
| 10 | 10 | 221312 | 11 |
| 20 | 20 | 231212 | 11 |
| 30 | 30 | 112232 | 11 |
| 40 | 40 | 122132 | 11 |
| 50 | 50 | 122231 | 11 |
| 60 | 60 | 113222 | 11 |
| 70 | 70 | 123122 | 11 |
| 80 | 80 | 123221 | 11 |
| 90 | 90 | 223211 | 11 |
| 99 | 99 | 231211 | 11 |
| 103 | Start C | 211232 | 11 |
| 106 | Stop | 2331112 | 13 |