Code 128 Barcode Generator
Code 128 is the workhorse of logistics and inventory: any ASCII text, compact digits, a built-in check symbol, and readable by every scanner. Type your text and download.
Letters, digits, punctuation - up to about 80 characters. Digit runs are packed two per symbol automatically.
Size & options
Need a code that people scan with a phone?
Barcodes are for tills and warehouse scanners. For links, menus and posters, make a free QR code instead - or a dynamic one you can edit after printing.
SVG for print, PNG for screens. Free, no watermark, nothing uploaded.
Need a different type? All barcode types
What Code 128 encodes
All 128 ASCII characters, through three code sets. Set A covers upper case, digits and control characters; set B covers upper and lower case, digits and punctuation; set C encodes pairs of digits in a single symbol, which is why an all-numeric Code 128 is roughly half the width of the same digits in Code 39. This generator picks the sets for you and switches mid-symbol when a run of digits is long enough to pay for the switch - four at the start or end, six in the middle, which is the GS1 rule.
Every symbol ends with a check character (the weighted sum of the symbols mod 103) that the scanner verifies and never displays, so a misread is rejected rather than passed through. The printed text under the bars is your data exactly as you typed it.
Code 128 vs GS1-128
GS1-128 is Code 128 with a leading FNC1 function character and data structured as application identifiers - (01) for a GTIN, (10) for a batch, (17) for an expiry date, and so on. Scanners then know they are reading a GS1 element string rather than free text. This tool produces plain Code 128; it does not insert FNC1, so it is not a GS1-128 encoder. For internal SKUs, serial numbers, asset tags, tickets and shipping references that your own system reads, plain Code 128 is the right choice and the one most warehouse labels actually use.
Size and quiet zones
Quiet zone: at least 10 times the X dimension on each side; the download includes it. X dimension: 0.25 mm is a practical minimum for a desktop or thermal label printer, and GS1 asks for 0.495 mm or wider on logistics labels scanned at a distance. Height: at least 15% of the symbol's width, and 12.7 mm (half an inch) is the common floor on shipping labels so an angled scan beam still crosses every bar. Longer content means a wider symbol, so a 40-character Code 128 on a small label is a printing problem before it is an encoding one - shorten the data or move to a Data Matrix.
Other barcode types
- Free Barcode Generator - Type the number or text, pick the symbology, download a print-ready SVG or PNG.
- EAN-13 Barcode Generator - EAN-13 is the barcode on nearly every product sold outside North America, and scanners everywhere read it.
- UPC Barcode Generator - UPC-A is the 12-digit barcode on products sold in the United States and Canada.
- Code 39 Barcode Generator - Code 39 is the older alphanumeric barcode still required by badge systems, automotive and defence specs.
- Data Matrix Code Generator - Data Matrix is the tiny 2D code on electronics, medical devices and machined parts.
- ITF-14 Barcode Generator - ITF-14 is the barcode on cases and cartons: a 14-digit GTIN in interleaved 2 of 5, framed by thick bearer bars so it prints reliably on corrugated board..
FAQ
Does Code 128 support lower-case letters?
Yes, through code set B, which this generator uses automatically whenever the text needs it. Code 39 does not, which is one of the reasons Code 128 replaced it.
Why is my barcode so wide?
Each character costs 11 modules, and the start, check and stop symbols add 35 more. Digits packed in set C cost 5.5 modules each. Shorten the content, use digits where you can, or use a Data Matrix, which holds the same data in a square a fraction of the width.
Can I encode a URL in Code 128?
Technically, yes - the characters are all ASCII. But a URL is for phones, and phones do not scan Code 128 without a dedicated app. Encode links in a QR code instead.
Is the check digit shown in the text?
No. Code 128's check character lives in the bars only. If you see an extra character in the printed text of someone else's symbol, that is their data, not the check.