Skip to content
cliplimeClipLime

Make a Code 128 barcode

Letters, digits and punctuation in a compact barcode. The check character is built in, and nothing is uploaded.

What you type stays in your browser

What should the barcode say?

Letters, digits, spaces and the usual punctuation. Digits are packed in pairs, so a long number makes a shorter barcode.

Your barcode

Type a number or some text and your barcode appears here, ready to download.

Style

Pixels for the thinnest bar. It sets how big the picture is.

3 px
100 px

In bar widths, on each side. Code 128 needs at least 10. The border is where a scanner finds the start of the code.

11 bars

The number or text a person can read.

20 px

Contrast 21:1Good

Black on white is the safest. Many shop scanners use red light and cannot see red or orange bars.

For PNG and SVG. The bars are then read against whatever is behind them.

Need a different kind of barcode? The barcode generator makes Code 128, Code 39, EAN-13, UPC-A, EAN-8 and ITF-14.

At a glance

What it holds
Letters, digits, spaces and standard punctuation: the 95 printable ASCII characters. Up to 100 characters.
Check character
Added inside the barcode for you. You never type it, and every scanner checks it.
Digits are packed
Pairs of digits share one symbol, so a long number makes a barcode roughly half as wide as the same number of letters.
Width
Each character takes 11 narrow bars, and every barcode adds a start, a check and a stop symbol.
Downloads
PNG and SVG, with your colours, bar width, height and blank border.
Blank border
At least 10 bar widths on each side. The tool warns when yours is smaller.
Privacy
Made in your browser. What you type is not uploaded or saved.

How to do it

  1. 1

    Type your text

    Order numbers, asset tags, serial numbers or tracking references. Lowercase letters are fine in Code 128.

  2. 2

    Check the width

    The preview shows how many bars wide the code is. If it is wider than your label, shorten the text or lower the bar width.

  3. 3

    Style it

    Choose the bar width, height and colours. Keep the blank border at 10 or more.

  4. 4

    Download and scan it

    Save a PNG or an SVG, print one, and read it with your own scanner before you print a sheet.

Why Code 128 is the usual choice for your own labels

Code 128 was designed in 1981 to hold the whole ASCII character set in a small space. It is not tied to a product database: whatever you encode is what a scanner returns, which is why it is used on shipping labels, parcel tracking numbers, warehouse bins, library items, asset tags and lab samples.

Most barcode scanners read it out of the box. Unlike EAN and UPC, there is no registry, no licence and no fixed length. You can use order numbers such as ORDER-2026-04817, a SKU with letters and digits, or a serial number.

A variant called GS1-128 uses Code 128 to carry several GS1 data fields in one label, such as a batch, an expiry date and a pallet number. This page makes plain Code 128 and does not build GS1-128 labels.

Subsets, digit pairs and how wide the barcode gets

Code 128 has three subsets, called A, B and C. Subset A holds capital letters, digits and control characters, subset B holds capital and lowercase letters, digits and punctuation, and subset C holds pairs of digits. The barcode can switch between them partway through, and the generator picks the shortest combination for your text.

That is why digits are cheap: in subset C two digits fit in one symbol. Typing 12345678 makes a barcode 79 bars wide, while the same number of letters, ABCDEFGH, is wider. A symbol is 11 bars wide, and the barcode adds a start symbol, a check symbol and a longer stop symbol.

Long text makes a wide barcode, and a wide barcode needs a wide label or a smaller bar width. Shorter references scan more easily, especially from a distance or with a phone camera.

Reading it back

A scanner returns exactly the characters you encoded and does not send the start, check or stop symbols. If a scanned value has an extra character at the end, that is usually the scanner or its software adding an Enter or Tab key press, which is a setting of the scanner and not a part of the barcode.

Code 128 can only hold plain ASCII here. Accented letters such as é, other alphabets and emoji will not fit. If you need those, use a QR code.

Questions people ask

What characters can a Code 128 barcode hold?

This tool accepts the printable ASCII characters: letters in both cases, digits, space and the usual punctuation. The format itself can also carry control characters, but they are rarely typed and are not offered here. Accented letters, other alphabets and emoji cannot be encoded.

Is there a check digit in Code 128?

There is a check character, but you never enter it. It is a weighted sum of all the symbols divided by 103, and it sits inside the bars between the data and the stop symbol. The scanner checks it and does not pass it on.

Why is my Code 128 barcode so wide?

Each character takes 11 bars, plus a start, check and stop symbol. Digits take half as much because two share a symbol. Shorten the text, lower the bar width, or use a QR code if you need to hold a lot.

Is Code 128 the same as GS1-128?

No. GS1-128 is a way of using Code 128 to carry several standard data fields, each starting with an application identifier, and it begins with a special function character. This tool makes plain Code 128.

Can I use a Code 128 barcode on a product sold in shops?

Shop checkouts read EAN-13 and UPC-A numbers that come from GS1, not Code 128. Code 128 suits your own labels, shipping and stock. For a retail number, see the EAN-13 barcode generator.

Guides that help

All QR codes guides →