Check that it fits
Type the code in the "Will it fit on the label?" box to see the minimum printed width, including the white margins the scanner needs.
Type the code, check the printed width and download PNG, SVG or PDF. Batch generation included.
Generated directly in your browser. Your data never leaves your computer
Updated on
Over 319,677 codes generated
Was this tool helpful? Rate it:
Type the code in the "Will it fit on the label?" box to see the minimum printed width, including the white margins the scanner needs.
Click "Generate this code" or type straight into the generator. Code 128 accepts uppercase and lowercase letters, numbers and keyboard symbols.
Download PNG, SVG or PDF. For many SKUs, use the Batch tab: one code per line, up to 200 at once, with ZIP and PDF export.
Code 128 is the most widely used linear barcode in logistics and inventory control. It encodes all 128 ASCII characters: uppercase and lowercase letters, numbers, space and symbols such as hyphen, slash and period. That makes it a fit for internal SKUs, lot numbers, shipping labels and any code that mixes letters and numbers.
| Feature | Code 128 |
|---|---|
| Characters | All 128 ASCII characters (no accented letters) |
| Length | Variable, no fixed number of digits |
| Check digit | Mandatory, calculated automatically (modulo 103) and not shown in the text |
| Width per character | 11 modules (the stop pattern has 13) |
| Quiet zone | At least 10 modules on each side |
| Scanning | Any standard 1D scanner, laser or imager |
The generator picks between the three Code 128 subsets (A, B and C) on its own. Runs of digits are packed in pairs with subset C, which makes the code shorter: "SKU-0042" takes 9 symbols instead of 10.
Use a UPC-A (or EAN-13) when the product goes to retail and gets scanned at the checkout, or when a marketplace asks for a GTIN. The number is numeric, has a fixed length and comes from GS1.
Use Code 128 for everything internal: your store SKU, shelf locations, lots, orders and shipping cartons. It accepts letters and needs no registration.
Code 128 is also the base of GS1-128, which carries data such as expiration date and lot through Application Identifiers like (17) and (10). This generator makes plain Code 128, without Application Identifiers.
If the code does not fit the label, shorten the text (long prefixes cost 11 modules per character) or use longer runs of digits, which subset C compresses.
Yes. Code 128 encodes uppercase and lowercase letters, numbers and keyboard symbols. It does not accept accented characters, which are outside the ASCII set.
No. The Code 128 check digit is mandatory, but the generator calculates it for you (modulo 103). It is built into the bars and does not appear in the text below the code.
The standard sets no fixed limit, but each character takes 11 modules. In practice the limit is the label width: use the "Will it fit on the label?" box to see the minimum width before printing.
Not as the product identifier. Retail checkouts and marketplaces read a GTIN (UPC-A or EAN-13). Code 128 is for internal use: SKUs, inventory, lots and shipping.
Yes. In the Batch tab, paste one code per line (up to 200) and download everything as a ZIP or as a print-ready PDF.
The more characters, the wider Code 128 gets. Type the code to see the minimum printed width, including the required white margins.
Format
Code 128
Alphanumeric text
Everything is processed in your browser — no data is sent anywhere
Your barcode will appear here