Code 128 Barcode Generator

Converters & calculators·Free · in browser

Code 128 Barcode Generator

Generate a Code 128 barcode from any text or number and download it as a PNG. Full ASCII, automatic subset switching, no signup and nothing uploaded.

Code 128 Barcode Generator
All tools

Code 128 is the general-purpose linear barcode: it encodes all 128 ASCII characters at high density and is what almost every warehouse, asset and logistics scanner expects. Type a value and the encoder picks the most compact subset automatically, appends the modulo-103 check character, and renders a scannable PNG in your browser.

Runs entirely in your browser · no signup · nothing is uploaded · updated 2026-09-08

Symbology

Code 128

Any ASCII. The general-purpose default.

How to use it

  1. 1.Type the value you want encoded - letters, digits and punctuation are all valid.
  2. 2.The encoder picks subset A, B or C for you and adds the mandatory check character.
  3. 3.Download the PNG at 300 DPI or higher and print it without rescaling.

Code 128 subsets

You never pick a subset by hand. The encoder switches between them mid-code to keep the symbol as short as possible, which is why a run of digits takes half the width of the same run of letters.

SubsetEncodesDensityChosen when
AUppercase, digits, punctuation, ASCII control codes1 char per symbolThe value contains control characters such as tab or newline
BUpper and lowercase, digits, punctuation1 char per symbolThe default for mixed text
CDigits only, in pairs2 digits per symbolFour or more consecutive digits appear

Frequently asked questions

What is Code 128 used for?

Anything internal: asset tags, warehouse locations, shipping references, work orders. It is not a retail symbology - a supermarket till expects EAN-13 or UPC-A - but for every barcode that never crosses a checkout, Code 128 is the default.

How many characters can Code 128 hold?

There is no fixed limit in the spec, but practice caps it around 20 to 25 characters. Past that the symbol gets too wide to scan in one pass and too wide to print on a normal label. If you need more, use a QR code.

Do I need to add a check digit?

No. Code 128 mandates a modulo-103 check character and it is computed and appended for you. Unlike EAN, it is not part of the human-readable text, so do not type one in.

What is the difference between Code 128 and GS1-128?

GS1-128 is Code 128 with rules on top: an FNC1 start character and standardised Application Identifiers that label each data field, such as (01) for a product number or (17) for an expiry date. The bars are identical; the meaning is not. This tool makes plain Code 128, so do not use it for a GS1-128 logistics label.

Why is Code 128 narrower than Code 39?

Subset C packs two digits into every symbol, and Code 128 uses variable-width bars where Code 39 uses a fixed wide/narrow pattern. On a numeric value Code 128 is typically half the width, which matters a lot on a small label.

Can Code 128 encode lowercase letters?

Yes, through subset B - that is one of its main advantages over Code 39, which is uppercase only. Case is preserved exactly, so scan-back into a case-sensitive system works.

How small can I print a Code 128 label?

Keep the narrowest bar at or above 0.25mm and leave a quiet zone of at least 10 narrow bars on both sides. A squeezed quiet zone is the single most common reason a correctly generated barcode will not scan.

Will every scanner read Code 128?

Effectively yes on modern hardware. Some very old laser scanners ship with Code 128 disabled in firmware and need it switched on in the configuration sheet, but nothing made in the last two decades struggles with it.

Tools that pair with this one

Built something?

RankCert is a weekly launch board where products rank on domain control we verify ourselves - not upvotes. Listing is free and the link is dofollow whether or not you display our badge.