How to make a Code 128 barcode
- Type or paste the value: a SKU, serial number, order number or any short text. The preview updates as you type.
- Keep black bars on white for the best scan rate. Adjust the thickness if the barcode has to fit a narrow label.
- Download PNG for documents and label software, or SVG for print artwork that stays sharp at any size.
- Print one label and scan it with the scanner you will really use before printing the whole batch.
What is Code 128?
Code 128 is a compact barcode for letters and numbers. It can hold all 128 ASCII characters: capital and small letters, digits, spaces and punctuation. That makes it the usual choice for shipping labels, warehouse bins, asset tags, order numbers and internal SKUs. It has no fixed length, so A-17 and SKU-10482-BL are both valid.
Code sets A, B and C
Code 128 has three code sets. Set A covers capital letters and control characters, set B covers capital and small letters, and set C packs two digits into one symbol. This generator chooses and switches sets by itself, so a long run of digits takes about half the width it would otherwise need. You only type the value.
The check character
Every Code 128 barcode ends with a check character (modulo 103) that lets the scanner reject a misread. The generator calculates it and adds it to the bars. It is not printed in the text under the barcode, and you do not type it.
How long can a Code 128 barcode be?
There is no fixed limit, but every character makes the barcode wider. For hand scanners and ordinary label sizes, values up to about 20 characters scan most reliably. Digits take half the room of letters. If you need to store a web address or a paragraph of text, a QR code holds far more in a small square.
Code 128 or GS1-128?
GS1-128 (formerly UCC/EAN-128) is Code 128 with a special FNC1 start character and GS1 application identifiers such as (01) for the product number or (10) for the batch. Carriers and retailers ask for it on logistics labels. This tool makes plain Code 128 and does not add FNC1, so use it for your own internal codes, not for labels that must be GS1-128.
Code 128, Code 39, UPC or EAN?
- Code 128: letters and numbers, compact, with a built-in check. The best general choice for internal use.
- Code 39: older and wider, capital letters and digits only. Choose it only when a system demands it; the format menu above offers it.
- UPC-A and EAN-13: the 12 and 13 digit barcodes shop checkouts read. Products sold in retail need one of these, with a number issued by GS1: see the UPC generator and the EAN-13 generator.
Size, quiet zone and print tips
- Leave a blank margin (quiet zone) on both sides at least ten times as wide as the narrowest bar. Do not crop it.
- Print dark bars on a white or light, matt background. The tool warns you when the bar colour is too light.
- Scale the barcode evenly. Stretching it sideways changes the bar widths and can stop it scanning.
- On a 203 dpi thermal printer, keep the narrowest bar at two printer dots or more.
SVG or PNG?
SVG is vector artwork: it stays sharp at any size and suits print shops and packaging files. PNG is a fixed-pixel image on a white background, exported at three times the preview size, which suits documents, spreadsheets and label software.
Which downloads are free?
PNG downloads have no daily cap. The free tier includes 5 SVG exports per day shared across the QR and barcode tools in this browser, resetting at midnight UTC. Premium (€49 once or €4.99/month) removes that cap and adds Bulk Mode: paste one value per line and download all the barcodes as one ZIP.
Related generators
For retail products use the UPC generator or the EAN-13 generator; the general barcode generator covers every format. To link to a web page, use the QR code generator, or print whole sheets of QR labels with the QR Label Maker.