Code 128 Barcode Generator
Generate a Code 128 barcode from printable ASCII text: letters, digits, punctuation and spaces. Code 128 is the most versatile linear barcode and is widely used in shipping, logistics, and inventory systems.
Barcodes generated locally using JsBarcode. All processing runs in your browser.
How it works
JsBarcode encodes your text in Code 128's automatic mode. It switches between code sets A, B and C as the text requires, packing runs of digits two per symbol in set C, which keeps numeric IDs short. It then appends the modulo-103 check symbol that every Code 128 barcode carries. The check symbol is part of the bars but not of the text printed under them. The result is drawn into an inline SVG, and Download PNG rasterises that SVG at twice its size.
Processing runs in your browser
All barcode generation happens locally in your browser tab. Our servers are not involved at any point.
Related operations
To encode URLs or text into scannable squares, try the QR code generator. To read codes back out of an image, use the QR code scanner. For hashing serial numbers before encoding, see the hash generator.
Frequently asked questions
- What is Code 128?
- Code 128 is a high-density linear barcode that can encode all 128 ASCII characters. It is widely used in logistics, shipping labels, and inventory management. This tool accepts the printable ones: letters, digits, punctuation and spaces.
- How long can the barcode text be?
- There is no hard limit, but longer strings produce wider barcodes. For practical scanning, keep the encoded string under 80 characters.
- Is my data uploaded anywhere?
- The barcode is generated using the JsBarcode library running entirely in your browser. Our servers are not involved.
- What is the difference between Code 128 and EAN-13?
- Code 128 is general-purpose, and this tool accepts printable ASCII text for it (letters, digits, punctuation and spaces). EAN-13 is a fixed 13-digit format for retail products. Use Code 128 unless you specifically need EAN-13 for retail compatibility.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to QR and barcode tools