Free Code 128 Barcode Generator
Type any text or number and get a Code 128 barcode with the check digit calculated for you. Download PNG for labels or SVG for print — free, no sign-up.
Choose a barcode format
Enter the data
Adjust the appearance
Preview your barcode
Shown on a product label
Overview
What is a Code 128 barcode?
A Code 128 barcode is a compact, high-density linear barcode that can encode all 128 ASCII characters: upper and lower case letters, digits, punctuation and control characters. Because it switches automatically between three character sets (A, B and C) and packs pairs of digits into one symbol, it produces shorter codes than older formats like Code 39 for the same data.
That flexibility makes it the default choice for shipping labels, warehouse locations, asset tags, tickets and internal inventory. It is also the base of GS1-128, the variant used on cartons and pallets with application identifiers. Every code includes a modulo-103 check character, which the generator calculates so scanners can detect misreads.
Choosing between formats is mostly about your partners: if a carrier, retailer or customer specifies one, follow it. When the choice is yours, this compact, flexible symbology is a safe default for anything that will be read inside your own business, from receiving to picking and shipping.
Use cases
Where Code 128 is used
Anywhere you need to encode letters and numbers in a small space.
Shipping labels
Carriers and couriers print tracking numbers in this format on parcels and waybills.
Inventory and SKUs
Tag stock, bins and shelf locations with alphanumeric SKUs that scan quickly.
Asset tracking
Label laptops, tools and equipment with asset numbers for audits and check-out.
Tickets and wristbands
Encode ticket IDs for fast scanning at gates and registration desks.
Libraries and archives
Label books, files and samples with unique IDs that include letters.
Manufacturing
Mark work orders, batches and serial numbers on the production line.
How it works
How to create a Code 128 barcode
No fonts, no plug-ins, and no check digit math.
- 1
Choose Code 128
It is selected already on this page. Switch formats any time from the format buttons.
- 2
Enter your data
Type letters, digits and symbols, for example ABC-123456. The generator picks the most compact character set and adds the check character.
- 3
Adjust and download
Set bar height, colors and whether to show the text, then download PNG or SVG.
Best practices
Tips for reliable scans
Code 128 is dense, so print quality matters.
Keep data short
Every character widens the code. Shorter values give wider bars at the same label width, which scan more reliably.
Even-length numbers are compact
Digits are packed in pairs, so a 12-digit number is much shorter than a 12-character mix of letters.
Print at a sensible width
For handheld scanners keep the narrowest bar at least 0.25 mm (10 mil) and leave a quiet zone on both sides.
Avoid ambiguous characters
Letters like O and digits like 0 look alike to people reading the text line. If staff will type IDs by hand when a scan fails, leave those characters out of your numbering scheme.
Use thermal printers for labels
Direct thermal and thermal transfer label printers produce sharp edges at 203 or 300 dpi, which keeps narrow bars clean. Inkjet on glossy paper can bleed and thicken bars.
FAQ
Frequently asked questions
What is a Code 128 barcode?
- A Code 128 barcode is a high-density linear barcode that encodes the full ASCII set — letters, digits and symbols — with a built-in check character. It is widely used in shipping, logistics and inventory.
How do I create a Code 128 barcode?
- Type your text into the generator above with Code 128 selected and download the PNG or SVG. The check character is calculated automatically.
What is the difference between Code 128 A, B and C?
- Set A covers upper-case letters, digits and control characters; set B adds lower-case letters; set C encodes pairs of digits. The generator switches between them automatically for the shortest result.
What is the difference between Code 128 and GS1-128?
- GS1-128 is Code 128 with a special start character and GS1 application identifiers such as (01) for GTIN or (17) for expiry date. Use GS1-128 when trading partners ask for it.
Code 128 or Code 39 — which is better?
- Code 128 is more compact and supports lower-case and symbols. Code 39 is simpler and still required by some industries. For new projects, Code 128 is usually the better choice.
How do I make a Code 128 barcode in Excel?
- Barcode fonts in Excel need extra formulas to add start, stop and check characters. It is easier to generate the image here and insert it, or paste it into a label template.
Can I use a Code 128 font instead?
- You can, but the font only draws bars; you still have to compute the check character and encode the start and stop symbols. The generator does that for you.
How long can a Code 128 barcode be?
- There is no fixed limit, but codes over about 20 characters get very wide. Most scanners and labels work best with 6 to 20 characters.
Does Code 128 have a check digit?
- Yes. A modulo-103 check character is always added before the stop pattern. It is not printed in the human-readable text.
Can I use it on retail products?
- No. Retail checkouts expect UPC-A or EAN-13. Use this format for internal labels, logistics and shipping.
Is the Code 128 barcode generator free?
- Yes. Create and download as many as you need in PNG or SVG, with no watermark and no sign-up.
Why will my code not scan?
- Check that the bars are dark on a light background, the quiet zone is clear and the code is not printed too small. Also make sure your scanner has Code 128 enabled.
Can a phone read these barcodes?
- Yes. Most scanner apps and many phone cameras read linear barcodes, though dedicated handheld scanners are faster and more reliable in a warehouse.
Can I put the code on a shipping label template?
- Yes. Download the PNG or SVG and place it in your label software, word processor or design tool. SVG keeps every bar sharp at any label size.