How it works
- Type the value. Letters, digits, spaces and standard keyboard symbols work, while accented letters and emoji do not.
- Set the bar width and height. Longer values make a wider barcode, so a narrower bar width can help it fit a label.
- Download a PNG or SVG, or print only the Code 128 barcode.
What Code 128 can encode
Code 128 covers all 128 ASCII characters: upper and lower case letters, digits, punctuation and a set of control characters. This tool accepts the printable ones you can type on a standard keyboard, up to 80 characters. Characters outside ASCII, such as é, € or emoji, cannot be encoded, and the tool lists which ones to remove.
Code sets A, B and C
Code 128 has three character sets. Set A covers uppercase letters, digits, symbols and control characters, set B covers upper and lower case letters, digits and symbols, and set C packs two digits into each symbol, which keeps long numbers short. The JsBarcode library used here picks the sets for you and can switch between them inside one barcode, for example using set C for a run of digits.
Where Code 128 is used
- Shipping and parcel labels, where carriers often use Code 128 or its GS1-128 variant.
- Warehouse bin locations, stock codes and pick lists.
- Order numbers, tickets and membership cards in your own system.
- Equipment labels that need lowercase letters or longer codes than Code 39 handles comfortably.
GS1-128 is a different thing
GS1-128 is a Code 128 barcode that carries GS1 data such as a product number, batch or expiry date, each starting with an application identifier. Supply chain partners usually specify exactly what they need. This tool makes plain Code 128, not GS1-128.
Getting a clean Code 128 scan
- Code 128 is commonly specified with a quiet zone of at least 10 modules on each side. The default here is 12.
- Keep values short where you can. Each symbol is 11 modules wide, so every extra character makes the barcode wider.
- Use the SVG when the label will be resized in design software.
More barcode formats
- Barcode generator with every format on one page
- Code 39 barcode generator for asset tags
- UPC barcode generator for retail products
- Data Matrix generator when a label is too small for Code 128
- PDF417 generator for more text than Code 128 holds
- Aztec code generator for ticket references
- ITF-14 barcode generator for shipping cartons
- ISBN barcode generator for book covers
- Check digit calculator for GS1 and ISBN numbers
Frequently asked questions
Do I need to register a Code 128 barcode?
No. The value is whatever you choose, so internal use needs no registration. If a customer or carrier specifies a format or numbering scheme, follow their rules.
Can Code 128 encode lowercase letters?
Yes. Code 128 encodes upper and lower case letters, digits and keyboard symbols, and a scanner returns the same text.
Why is some of my text rejected?
Code 128 only covers ASCII characters. Accented letters, curly quotes, currency signs other than $ and emoji are outside that set, and the tool lists each one so you can replace it.
How long can a Code 128 barcode be?
JsBarcode does not set a maximum, but every character makes the barcode wider. This tool stops at 80 characters so the barcode stays a printable width.
Should I use Code 128 or Code 39?
Code 128 fits more into the same width and handles lowercase letters. Code 39 is simpler and still common for asset tags in older systems, so match whatever your scanner setup expects.
