How to make a Code 128 barcode
- Type the text to encode: letters, numbers, spaces and keyboard symbols such as
- / . #all work. - Choose a bar width. 0.33 mm suits most labels, and wider bars scan more easily from a distance.
- Download SVG for design software and label printers, or PNG for documents. Then test a printed label with your scanner.
Why Code 128?
Code 128 packs data tightly. It has three character sets: one for upper-case letters and control characters, one for upper- and lower-case text, and one that stores pairs of digits in a single symbol. The encoder switches between them automatically to keep the barcode short, so long numbers take up much less room than in Code 39. A check character is calculated and added for you, and scanners use it to detect misreads. It isn’t shown in the text under the bars.
Good uses
- SKUs and stock locations in shops and warehouses
- Asset tags for IT equipment, tools and furniture
- Document, sample and file tracking
- Shipping and internal parcel labels
Things to know
- Code 128 is for your own numbering. For products sold in shops, you need a GS1 number in an EAN-13 or UPC-A barcode instead.
- Long text makes very wide barcodes. Above about 30–40 characters, consider a QR code.
- Leave at least 10 bar-widths of blank space either side. Our downloads include this margin.
Questions
What’s the difference between Code 128 A, B and C? They’re the three character sets inside Code 128. You don’t need to choose: the encoder picks the most compact mix for your text.
Can I use lower-case letters? Yes. Unlike Code 39, Code 128 encodes both cases.
Sources
- GS1 UK, GS1 UK. Accessed 2026-11-29.
Reviewed on by Richard Pryn.