Code 128 Barcode Generator
Code 128 is a compact, high-density barcode that encodes all 128 ASCII characters, making it the usual choice for internal labels, inventory, asset tags and shipping references. Type your text and the app picks the most efficient subsets automatically.
What Code 128 is used for
Code 128 (ISO/IEC 15417) is used for warehouse locations, parts, work orders, document tracking and carrier tracking numbers. It needs no licence, so you can encode your own numbering scheme. For trade items exchanged with other companies, use GS1-128, the GS1 variant, instead.
Subsets A, B and C
- Code Set A: uppercase letters, digits, punctuation and ASCII control characters such as tab and carriage return.
- Code Set B: uppercase and lowercase letters, digits and punctuation, the usual choice for text.
- Code Set C: pairs of digits 00–99 in one symbol character, which roughly halves the width of long numbers.
- Each symbol character is 11 modules wide (three bars and three spaces); the stop pattern is 13 modules.
- A mandatory mod-103 check character is added automatically and is not shown in the human-readable text.
Size and printing tips
Leave a quiet zone of at least 10X on both sides. A bar height of at least 15% of the symbol length, or 6 mm, whichever is larger, helps handheld scanning. On 203 dpi thermal printers, choose an X dimension that is a whole number of dots, such as 2 or 3 dots (0.25 or 0.375 mm). Keep data short: about 20 characters is comfortable on a 100 mm label. Use dark bars on a light background and check quality with ISO/IEC 15416 if labels go to a customer.
How to make it
- Select Code 128 in the barcode generator.
- Enter your text or number; the app switches between subsets to minimise width.
- Set the module width and height using the print size guidance.
- Export SVG, PDF or PNG, or print many labels from a CSV list.
- Scan a sample with the camera or a USB scanner to confirm the content.
Frequently asked questions
Can I use Code 128 on retail products?
Not for checkout scanning. Retail products need EAN-13 or UPC-A with a GS1 GTIN.
Code 128 vs Code 39: which is better for labels?
Code 128 is more compact and supports lowercase. Code 39 is wider but still required by some older systems and industry standards.
Why is my number shorter as a barcode when it has an even number of digits?
Even-length digit strings are encoded in Code Set C, two digits per character.