Code 128

Code 128 barcode: for warehouses and inventory

Inventory numbers, storage locations, serial numbers or job tickets don’t need an official GS1 number. Code 128 is the first choice here: it handles letters and digits, is compact and is read by practically every scanner. Here is how it works and when another type fits better.

Enter text or a number, pick a size, done: the Barcode Generator creates Code 128 one at a time or as whole label sheets – free and with no upload.

Create a Code 128

The short version

  1. In the Barcode Generator, choose Code 128.
  2. Enter a number or text – letters, digits and symbols are allowed.
  3. For many codes use “Sequence”, e.g. starting at INV-0001.
  4. Save as SVG, PDF, PNG or straight onto a label sheet.

What Code 128 can do

Code 128 can encode all 128 ASCII characters – upper and lower case letters, digits, punctuation and control characters; with a shift character also Western European characters such as accented letters. Internally it switches between three code sets:

Code setContentNote
ACapital letters, digits, control charactersfor legacy systems
BUpper and lower case letters, digits, symbolsthe usual choice for text
CDigits onlytwo digits per character – very compact

You don’t have to deal with code sets: the generator automatically picks the shortest combination. The check character (modulo 103) is calculated automatically too; it is hidden in the barcode and not shown in the text.

Tip: purely numeric content with an even number of digits gets especially short. 00012345 makes a shorter code than INV-12345.

Code 128, Code 39, EAN or DataMatrix?

TypeContentGood forNot for
Code 128Text and digitsInventory, warehouses, internal numbersRetail products
Code 39Capital letters, digits, a few symbolsSystems that explicitly require itLong content – the code gets very wide
EAN-1313 digits (GTIN)Retail productsInternal numbers
GS1-128GS1 data with application identifiersShipping, batch, expiry dateFree text
DataMatrixAny text, 2DVery little spaceLaser scanners without 2D support

Code 39 is older and needs considerably more width for the same content. It is only worth it if existing software or a customer explicitly requires it.

Generate inventory numbers from INV-0001 to INV-0500 and print them straight onto a label sheet.

Step by step

  1. Type. In the Barcode Generator, click Code 128.
  2. Content. For example INV-0042. The euro sign and characters outside the Western European character set are not possible – the generator tells you.
  3. Size. Module width 0.25–0.5 mm, bar height at least 15% of the width or 6.35 mm. The total size is shown below the inputs.
  4. Check. The readability check reads the code back in your browser and warns e.g. about short bars or unsuitable colors.
  5. Many codes. Under “Batch & labels”, paste a list or number sequentially and save as ZIP or label sheet.

Size and printing

Typical uses

Inventory

Every device gets a number like INV-0042 – stocktaking with a scanner or phone app instead of copying numbers.

Storage locations

Aisle, shelf and level as A-03-2. Pickers scan the location to confirm.

Orders and documents

Print the order number on job tickets, delivery notes or work orders – one scan opens the record.

Libraries and rentals

Media and member card numbers for clubs, schools or tool libraries.

Create your Code 128

One at a time or hundreds at once, as SVG, PDF, PNG or label sheet – with readability check, free and with no upload.

Frequently asked questions

Is the Code 128 generator free?

Yes, with no sign-up, no watermark and no limit – including label sheets and ZIP exports.

Which characters can Code 128 encode?

All ASCII characters – upper and lower case letters, digits and symbols – plus Western European characters such as accented letters. The euro sign is not included.

Do I need a GS1 number for Code 128?

No. Code 128 is meant for internal numbers. Only retail products (EAN) and GS1-128 with GTIN or SSCC need GS1 numbers.

Which is better: Code 128 or Code 39?

Code 128 in almost all cases – it is more compact and supports more characters. Use Code 39 only if a system explicitly requires it.

Does Code 128 have a check digit?

Yes, a modulo 103 check character. It is calculated automatically and not shown in the text.

Can I scan Code 128 with my phone?

Yes. Many camera apps and practically all barcode scanner apps read Code 128.

Sources

  1. Barcode Writer in Pure PostScript and bwip-js – the open-source libraries the generator uses to draw the codes.
  2. ZXing – the open-source decoder behind the readability check.

Code 128 barcodes and labels – free, no upload.

Open the tool