What Code 128 is
Code 128 is a high-density linear (1D) barcode standard that can encode all 128 ASCII characters — digits, uppercase and lowercase letters, and common symbols. That flexibility makes it one of the most widely used barcodes in the world for shipping labels, inventory tags, ID cards, asset tracking, and warehouse logistics. This tool uses Code 128 B, the character set that covers everyday text, so you can encode a product name, a SKU, an order number, or a serial number.
How the barcode is built
Each character maps to a specific pattern of bars and spaces of varying widths. The encoder starts with a special start symbol, adds a pattern for every character in your text, computes a modulo-103 checksum that scanners use to detect misreads, and finishes with a stop symbol and final bar. Getting that checksum right is essential — a barcode with a wrong or missing check digit will be rejected by compliant scanners — and this tool calculates it automatically. The result is drawn on a canvas with a quiet-zone margin on each side so readers can find the code's edges.
Choosing the bar width
The bar-width setting controls how many pixels wide the narrowest bar is. For on-screen scanning, two or three pixels is plenty. For printing, a wider setting produces a crisper barcode that tolerates lower printer resolution and scanning from a distance. As with QR codes, the most common cause of scan failure is a barcode printed too small or without its light margin, so err toward larger when in doubt and keep the quiet zone clear.
Common uses
Small businesses generate barcodes for products they sell, for asset tags on equipment, and for organizing inventory in a spreadsheet where each item's ID is also printed as a scannable code. Event organizers put barcodes on tickets. Libraries and makerspaces label items. Because you can download the PNG, you can drop the barcode into a label template, a document, or a print sheet. Any standard barcode scanner app or hardware reader will decode it.
Privacy notes
The encoder runs entirely in your browser. The text you turn into a barcode is never sent to a server, stored, or logged, so internal SKUs, serial numbers, and other business data stay on your device. The tool works offline once loaded, which is handy when you are labeling stock in a back room with poor connectivity.