Free Code 128 Barcode Generator
Generate a Code 128 barcode for shipping labels, inventory tracking, and internal operations.
0/80 characters · Supports full ASCII (letters, numbers, symbols)
Enter text to generate the barcode.
Find this tool useful? Save it for next time.
How to generate a Code 128 barcode
Type or paste your text into the input field. The barcode generates instantly as you type - no button press required. Code 128 accepts the full ASCII character set including letters (upper and lower case), digits, spaces, and most punctuation. When you are happy with the barcode, download it as an SVG for print workflows or a PNG for digital use.
Code 128 is the right format when you need to encode arbitrary text or alphanumeric identifiers. For purely numeric data of fixed length such as product codes, EAN-13 or UPC-A may be more appropriate. For short uppercase-only strings in legacy systems, Code 39 is an option.
Where Code 128 is used
- Shipping and logistics labels - parcel tracking numbers, carrier barcodes
- Warehouse and inventory management - item, bin, and location codes
- Healthcare - medication labels, patient wristbands, sample tubes
- Retail internal operations - stock transfer labels, receiving documents
- Manufacturing - work-in-progress tracking, serial number labels
- Event management - ticket barcodes, access control
Printing Code 128 barcodes
Download the SVG for use in professional print software such as Adobe Illustrator, InDesign, or label design tools. The SVG renders at full quality at any size. For thermal label printers, most label software (Bartender, ZebraDesigner, NiceLabel) can import SVG directly.
- Print with an X-dimension of at least 0.25 mm for reliable industrial scanning
- Maintain quiet zones of at least 10 bar widths on each side
- Use black bars on a white background - avoid coloured backgrounds
- Do not scale the barcode disproportionately - maintain the original aspect ratio
Frequently asked questions
What is a Code 128 barcode?
Code 128 is a high-density, alphanumeric linear barcode standard that can encode all 128 ASCII characters. It is widely used in shipping labels (GS1-128/UCC/EAN-128), logistics, inventory management, and anywhere a compact, flexible barcode is needed. Code 128 is more efficient than Code 39 for numeric data and supports the full range of letters, numbers, and symbols.
What characters can Code 128 encode?
Code 128 encodes all 128 characters defined in the ASCII standard, including uppercase and lowercase letters, digits 0–9, and all standard punctuation and control characters. This makes it suitable for encoding text such as order numbers, serial numbers, tracking codes, and any other alphanumeric string used in operations.
What is the difference between Code 128A, 128B, and 128C?
Code 128 has three subsets. Subset A encodes uppercase letters, numbers, and control characters. Subset B encodes all printable ASCII characters including uppercase and lowercase letters. Subset C encodes pairs of digits (00–99) in a single symbol, making it twice as dense for purely numeric data. A good barcode generator like this one automatically selects the most efficient subset or combination of subsets for your input.
What is GS1-128 and is it the same as Code 128?
GS1-128 (formerly EAN-128 or UCC-128) is a specific application of Code 128 used in supply chain and logistics. It uses Application Identifiers (AIs) - short numeric codes in parentheses such as (01) for GTIN or (17) for expiry date - to define what each piece of encoded data means. GS1-128 requires GS1 registration and follows strict formatting rules. This tool generates standard Code 128 barcodes, not GS1-128, since GS1-128 requires structured AI fields that vary by application.
How long can the input be for a Code 128 barcode?
There is no hard length limit in the Code 128 specification, but longer strings produce wider barcodes that require larger print areas and may scan less reliably if printed too small. As a practical guideline, keep Code 128 content under 80 characters for typical label applications. The barcode width grows proportionally with the encoded content.
What print size do I need for a Code 128 barcode?
The minimum bar width (X-dimension) for reliable scanning is 0.19 mm in high-quality printing environments, with 0.25–0.50 mm recommended for general use. The barcode height should be at least 15% of the barcode length, with a minimum of 6.35 mm. There is no standard size equivalent to EAN-13 - Code 128 size is determined by the number of encoded characters and the chosen X-dimension.
Can Code 128 barcodes be scanned with a phone?
Yes. Modern smartphone barcode scanner apps (including Google Lens, the native iOS camera, and dedicated scanner apps) support Code 128. However, standard QR scanner apps may not - look for apps that advertise "barcode" or "multi-format" scanning. In industrial settings, handheld barcode scanners support Code 128 universally.
Why does this tool generate a better barcode than just typing numbers?
The tool uses JsBarcode, a standards-compliant implementation that automatically selects the optimal Code 128 subset for your input, calculates the required check character, adds the correct start and stop symbols, and renders the quiet zone. Manually creating a Code 128 barcode from scratch is complex and error-prone. The tool handles all of this correctly and produces a scannable output every time.
Related Tools
Code 39 Barcode Generator
Generate a Code 39 barcode for inventory systems, asset labels, and legacy scanning workflows.
EAN-13 Barcode Generator
Generate a standards-compliant EAN-13 barcode for retail product labels. Download as SVG or PNG.
Barcode Label Sheet Generator
Enter a list of barcodes, choose a label sheet layout, and generate a print-ready sheet in seconds.