Code 128 Barcode

Make Code 128 barcodes for labels, parcels and stock: any text or number, shortest encoding, PNG or SVG download.

Runs in your browserNo sign-upWorks offline
Preview only

What the Code 128 Barcode does

The Code 128 Barcode tool makes the barcode used on shipping labels, parcels, stock and asset tags. It encodes letters, numbers and symbols, and switches to the compact number set for runs of digits, so numbers make shorter barcodes. Set the bar width and height, show or hide the text, choose colours, and download a sharp PNG or an SVG for printing.

How to use it

  1. Type the text or number to encode.
  2. Set the bar width and height.
  3. Choose whether to show the text underneath.
  4. Download PNG or SVG.

Example

KIT-2026-00417 becomes a 16-symbol barcode: start, check and stop symbols around the data, with the digits after “KIT-2026-” packed two per symbol. Barcodes made with the tool were read back correctly by the zxing-cpp reader used in the QR Code Reader, including mixed text like “Mixed CASE 99 x”.

Printing barcodes

Keep the clear space on both sides: scanners need it to find the start and end. Use black bars on white, and print with bars at least 0.25 mm wide on labels; increase the bar width for thermal printers. SVG keeps bars perfectly sharp at any size.

Code 128 is not used on products in shops; retail items use EAN-13 or UPC-A. For those, use the EAN-13 Checker.

Test a few printed labels with the scanner you will actually use before printing a full roll, especially on glossy or curved surfaces.

Code 128 sets A, B and C

Code 128 has three character sets. Set A holds capital letters, digits and control characters; set B holds capital and small letters, digits and punctuation; set C packs two digits into each symbol, which makes long numbers much shorter. The tool picks and switches sets automatically to make the shortest barcode, which is why a number like 00417 takes fewer symbols than letters of the same length.

BarcodeHoldsTypical use
Code 128Any basic text and numbersShipping labels, stock and asset tags
EAN-13 / UPC-A12 or 13 digits onlyRetail products at a checkout
QR codeLong text, links, Wi-Fi detailsPhones, posters, payments

To check a printed barcode, scan it with the QR Code Reader, which reads Code 128 from a photo or the camera. For links and longer text, make a QR code with the QR Code Generator.

Questions people ask

Is anything uploaded?

No. Codes are made and read in your browser, so passwords, contacts and images stay on your device.

What characters can it hold?

Letters, digits, punctuation and spaces from basic ASCII. Accented and Hindi letters cannot be encoded.

Is there a length limit?

No fixed limit, but long barcodes become hard to scan. Keep it to around 20 to 30 characters.

Does it include a check digit?

Yes. Code 128 always has a check symbol, which the tool adds for you.

Can I scan a Code 128 barcode online?

Yes. Open the QR Code Reader and use your camera or a photo; it reads Code 128 as well as QR codes.

Related tools