Code 128 Barcode Generator

Encode letters, digits and symbols as a compact Code 128 barcode for labels, parcels and stock.

  • Free
  • Code 128 A · B · C
  • PNG + SVG
  • Bulk ZIP
4 006381 333931
Bulk: create many barcodes at once

How to use the Code 128 Barcode Generator

  1. Start from the Code 128 sample

    The generator opens on Code 128 with the example value ABC-12345 already drawn, so you can see what a valid barcode looks like.

  2. Type your own value

    Replace the sample with a SKU, order number, serial or any text. The bars redraw as you type and the check character is added for you.

  3. Download for print or labels

    Save an SVG for crisp printing or a PNG for documents. For a run of labels, paste one value per line under “Bulk” and get a ZIP.

Your file
  • Text
On your device

Code 128 Barcode Generator

The file is read and rewritten by code running in this tab. Nothing is sent to a server.

What you get
  • Barcode
  • PNG or SVG

How Code 128 encodes text

Code 128 turns each character into a symbol of three bars and three spaces that together are 11 modules wide (a module is the width of the thinnest bar). A complete barcode is: a quiet zone, a start symbol that picks set A, B or C, the data symbols, a check symbol, a 13-module stop pattern, and another quiet zone. It was introduced in 1981 by Computer Identics and is standardised as ISO/IEC 15417.

Code setCharactersGood for
AA–Z, 0–9, punctuation, ASCII control characters (such as tab)Older systems that send control codes
BA–Z, a–z, 0–9, punctuationMixed text: product codes, names, SKUs
CDigit pairs 00–99, two digits per symbolLong numbers: tracking, serials, order numbers

Code 128 samples and their size

Because set C stores two digits per symbol, numbers make much narrower barcodes than letters. These widths were measured with this generator, without the quiet zones (add 10 modules on each side):

Sample valueCode sets usedWidth in modules
1234567890C only90
ABC-12345B, then C123
SKU-00042B, then C123
ABCDEFGHIJB only145

At a module width of 0.33 mm, the 123-module sample above is about 4 cm wide plus its margins. If your label is narrow, shorten the value or use more digits; a QR code or DataMatrix stores much more in less space.

Tips for Code 128 labels

  • Stick to plain ASCII. Accented letters and emoji are outside the 128 basic characters; scanners may decode them differently, so test before printing.
  • Keep the human-readable line (on by default) so people can type the code when a scan fails.
  • Use one value per line in Bulk to number a whole shelf or batch of parcels at once — up to 500 barcodes per ZIP.
  • Need a retail product barcode instead? Shops scan UPC-A or EAN-13, not Code 128. All formats are on the main barcode generator.

Frequently asked questions

What is a Code 128 barcode?
Code 128 is a compact linear barcode that can encode all 128 ASCII characters: upper- and lower-case letters, digits, punctuation and control codes. It is used on shipping labels, warehouse shelves, asset tags and many internal systems.
What are Code 128 A, B and C?
They are three character sets inside the same symbology. Set A covers capital letters, digits, punctuation and control characters; set B covers capitals, lower case, digits and punctuation; set C packs two digits into each symbol. A barcode can switch between sets mid-way, and this generator chooses the switches automatically.
Can you show a Code 128 example?
The tool above opens with one: ABC-12345. It starts in set B for “ABC-1” and then switches to set C for the digit pairs “23” and “45”. Try 1234567890 as a second example — ten digits fit into only five set C symbols.
Do I need to add a check digit to Code 128?
No. Code 128 has a mandatory check character calculated with a modulo-103 sum, and the generator adds it. It is part of the bars but is not printed in the text under them.
Is Code 128 the same as GS1-128?
GS1-128 (formerly UCC/EAN-128) is Code 128 with a special FNC1 character at the start and data in GS1 application identifiers, such as (01) for a product number. This page makes plain Code 128. If a customer or carrier asks for GS1-128, check their specification before using these labels.
Why does my Code 128 barcode not scan?
The usual causes are a missing quiet zone (keep blank space of at least ten bar widths on each side — the download includes it), bars printed too small for the scanner, or a PNG that was stretched. Print the SVG at a size where the narrowest bar is still clearly visible, and test it with the barcode scanner.