Free Code 128 barcode generator
Free · No signup · Guide approved 18 November 2026 by Nirav Italiya, founder · How we check guides
How do I make a Code 128 barcode?
Type one value per line (letters, numbers and symbols) and each becomes a Code 128 barcode with the text printed underneath. Download them as PNG images or as a printable sheet of labels. Code 128 is the right choice for SKUs, warehouse bins, order numbers and shipping labels; for products sold in retail stores you need a registered UPC or EAN instead.
Code 128 is for your own SKUs and warehouse labels. Marketplaces that ask for an EAN or UPC usually want a number registered with GS1, so making a barcode image does not give you a valid product ID. Test-scan a printed sheet before labelling stock.
Labels sorted, listings next
Make your next catalogue in minutes
Put every new design on an AI model, in the colours you stock, without booking a shoot.
- First 2K photo free, no card
- Ready in about 3 minutes
- Full commercial rights


How to use it
- Keep Code 128 selected.
- Type or paste your values, one per line. Add a comma and a name to print a caption under the barcode.
- Check the preview, then download PNGs or a label sheet.
- Print at 100% scale and test a few labels with a scanner or phone.
Who this is for
This generator is for sellers who need barcodes for their own system rather than for a retailer’s: SKU labels on shelves and bins, order or invoice numbers on packing slips, returns tags, and batch or lot numbers on stock. If you run a small warehouse, a stockroom or a home inventory with a handheld scanner, Code 128 is the usual choice because it carries letters, digits and symbols in a short, dense bar pattern.
It is not a way to get a product barcode that retailers or marketplaces accept. Those need a number registered with GS1. What this tool gives you is a free, watermark-free barcode for any text you choose, in bulk, laid out on a print sheet or a thermal label.
How the tool encodes your text
The encoder picks one of two Code 128 modes for each line. If the line is digits only, has an even number of digits and is at least four digits long, it uses the numeric mode (subset C), which packs two digits into each bar group. Anything else uses the general mode (subset B), which handles upper and lower case letters, digits and punctuation. The tool does not switch between modes inside one line, so a SKU such as KURTI-BLU-M-001 is encoded entirely in subset B.
Every barcode ends with a check character and a stop pattern. The check character is the start value plus each character value multiplied by its position, taken modulo 103. For the text AB in subset B: start 104, A is 33, B is 34, so 104 + 33 × 1 + 34 × 2 = 205, and 205 mod 103 = 102. A scanner repeats the sum and rejects the read if it differs, which is why a damaged barcode usually fails to scan instead of scanning wrong.
The encoder accepts printable ASCII only (space to tilde). Accented letters, rupee and euro signs and non-Latin scripts are rejected with an error under the row. Only the first comma on a line is treated as the caption separator, so a comma cannot appear inside the value itself. Up to 500 lines are read at a time.
Why shorter values print better
A Code 128 symbol uses 11 modules (the narrowest bar width) per character, or per pair of digits in numeric mode, plus 11 for the start, 11 for the check and 13 for the stop. The barcode image adds 10 modules of blank margin on each side. The table shows how fast the width grows.
| Value | Mode | Modules | Width at 0.25 mm per module |
|---|---|---|---|
| 12 digits | C (numeric) | 121 | 30.3 mm |
| 12 characters including a letter | B | 187 | 46.8 mm |
| KURTI-BLU-M-001 (15 characters) | B | 220 | 55.0 mm |
| 20 characters | B | 275 | 68.8 mm |
What happens on a small label
The print sheet PDF shrinks each barcode to fit its label, and the bars get thinner as a result. By our reading of the layouts the tool draws, a 15-character SKU ends up with a module of roughly 0.28 mm on the 24-label sheet, 0.21 mm on the 40-label sheet, 0.20 mm on the 50 × 25 mm thermal label and 0.17 mm on the 65-label sheet. There is no single minimum that suits every scanner and printer, but bars narrower than about 0.2 mm start to get unreliable on thermal printers and cheap scanners.
If your test scans are flaky, shorten the value, use all digits so numeric mode applies, or move to a layout with bigger labels. Dropping a prefix such as the year or brand from every SKU is often the quickest fix.
Designing SKUs that scan well
- Keep to one pattern, such as category-colour-size-sequence, so a person can read it and a scanner can read it.
- Avoid look-alike characters. Letter O and digit 0, or I and 1, cause trouble when staff type a code by hand.
- Use the caption option (a comma after the value, then a name) when staff need to see the product name as well as the code, and turn on the print-name tickbox.
- Print a test sheet on the actual stock and scan every label type with the scanner you will use before labelling the whole shelf.
Why Code 128
Code 128 encodes all 128 ASCII characters, so it handles mixed SKUs such as KURTI-BLU-M-001. It packs digits densely and includes a built-in check character, which is why it is the standard for shipping labels (GS1-128) and warehouse systems.
Code 128 vs UPC and EAN
UPC and EAN carry a registered GS1 product number that identifies your product in shops worldwide. Code 128 carries whatever you type and means something only in your own systems. Use Code 128 internally and UPC/EAN on retail packaging.
Printing tips
Keep the white margins (quiet zones) on both sides, print black on white, and avoid scaling the image down so far that bars merge. On a thermal printer, set the print to 100% and use the label size your printer is loaded with.
Common mistakes
- Printing a Code 128 barcode on a product that must carry a UPC or EAN for a retailer. Code 128 carries your own numbering and means nothing to a point-of-sale system.
- Using very long values on small labels, which squeezes the bars until they scan badly.
- Putting a comma in a SKU. The tool reads everything after the first comma as a caption.
- Printing in colour or on a dark background. Black bars on white give the most reliable scans.
- Changing scale in the print dialog. Print the PDF at 100% so the bars keep the width the tool calculated.
- Reusing a SKU for a different product later, so old scans in your records point to the wrong item.
What this tool can’t do
- It does not make GS1-128 barcodes with application identifiers or function characters, which some logistics partners require.
- It encodes plain ASCII only and does not switch modes inside a line, so long mixed values are wider than a hand-optimised encoder would produce.
- It cannot tell you whether your scanner will read a given label. Only a test scan can.
How this guide was made: drafted with AI assistance from the tool’s own calculations and behaviour, then checked against our editorial policy and approved by the founder before publishing.
Official sources
Fees, tax rates and rules change. Confirm the current figures on the official page before you rely on a result:
Questions
- What is a Code 128 barcode used for?
- SKUs, inventory and bin labels, order and invoice numbers, and shipping labels. It can encode letters, numbers and symbols.
- Can I use Code 128 on Amazon FBA labels?
- Amazon prints its own FNSKU labels in Code 128. You can use this tool for your internal SKU labels; for FBA product labels, print the FNSKU labels from Seller Central.
- How long can a Code 128 barcode be?
- There is no fixed limit, but longer values make wider barcodes. Keep values under about 20 characters for small labels.
- Is Code 128 free to use?
- Yes. The symbology is public, and barcodes made here are free with no watermark. Only GS1 product numbers (UPC/EAN) are licensed.
- Will my phone scan these barcodes?
- Yes. Most barcode scanner apps and handheld scanners read Code 128. Try our barcode scanner page to test one.
- Can I print several copies of each barcode?
- Yes. Set “Copies of each code” and every code repeats that many times on the sheet, ready to stick on each unit.
- Can I use a half-used sticker sheet?
- Yes. Set “Start at label #” to the first empty label and printing starts there, so the used labels are skipped.
- What is the difference between Code 128 and Code 39?
- Code 128 is more compact and supports all ASCII characters; Code 39 is older, wider and supports fewer characters.
- Can Code 128 encode lowercase letters?
- Yes. Code 128 encodes upper and lower case letters, digits and symbols.
- How do I print Code 128 labels on a thermal printer?
- Choose the thermal label layout, download the PDF and print at 100% scale on your label size.
Related free tools
More free tools like this
Barcodes & QR
Inventory
