Skip to content
toolsvine

Code 128 Barcode Generator

Print-ready Code 128 barcodes for labels, stock and shipping — free.

Processed locally – files never leave your device

Code 128 encodes ASCII characters 0–127. The code set (A, B or C) is picked automatically for the most compact barcode.

Your barcode will appear here.

Next: try QR Code Generator — QR Code Generator — download PNG/SVG, no limits.

Need a barcode for a product, a shelf label, an asset tag or a shipping box? This free Code 128 barcode generator draws one in your browser from any text — letters, digits and symbols — and lets you download it as a crisp SVG for print or a PNG for documents.

Code 128 is the workhorse of logistics: dense, reliable, and readable by nearly every scanner ever made. When the thing you need to share is a link or a message for a phone camera instead, the QR Code Generator is the better fit. For a one-off unique label number, grab it from the UUID v4 Generator first.

How to use

  1. Type the text to encode — letters, digits and symbols are all fine.
  2. Set the bar width and height, and choose whether the text prints under the bars.
  3. Click Generate barcode. The barcode appears instantly.
  4. Download it as an SVG for print, or as a PNG for documents and emails.

Why use Toolsvine

Barcode sites that process your data on a server see every product code and serial number you encode. Toolsvine draws the barcode locally in your browser, so your inventory data stays private. It is free, has no limits, and the SVG output stays sharp at any print size.

What is Code 128?

Code 128 is a high-density barcode that can encode the full ASCII set — all 128 characters from 0 to 127. Each character is drawn as a pattern of bars and spaces 11 modules wide, and the symbol ends with a check digit the scanner verifies silently, plus a stop pattern and a quiet zone of blank space on each side.

Three code sets, picked automatically

Code setEncodesBest for
Code 128-AUppercase, digits, control charactersLegacy systems, control codes
Code 128-BFull printable ASCIIGeneral text, mixed case
Code 128-CPairs of digits, two per symbolLong numbers — twice as dense

A good encoder switches sets mid-symbol: digits get encoded in pairs with set C, then it flips back to B for letters. This tool picks the sets automatically, so “HELLO123” and a 20-digit serial both come out as compact as possible without you thinking about it.

Printing tips

Leave a quiet zone — blank space at least ten times the narrowest bar — on both ends, or scanners may not find the symbol. Print dark bars on a light background, never the reverse, and test-scan at the real size: bars that look fine on screen can blur together when shrunk. If a scanner struggles, increase the bar width rather than the height.

Frequently asked questions

What characters can Code 128 encode?

All of ASCII, characters 0–127: letters, digits, punctuation and control characters. Characters outside that range, such as emoji or Bangla letters, cannot be encoded and this tool will tell you so.

What is the difference between Code 128-A, B and C?

They are three alphabets inside one barcode: A covers uppercase plus control characters, B covers all printable ASCII, and C encodes digit pairs for double density. A good encoder switches between them automatically, which this tool does.

Should I download SVG or PNG?

SVG for anything printed — labels, packaging, shipping boxes — because it scales without blurring. PNG is fine for documents, emails and screens.

Why won't my scanner read the printed barcode?

Usually the quiet zone is missing, the bars are too narrow for the printer, or the contrast is too low. Reprint larger, keep blank space on both ends, and use pure black bars on white.

Is the text I encode uploaded anywhere?

No. The barcode is drawn entirely in your browser. Nothing you type is sent to a server or stored.

Related tools

More in this category: QR & Barcode Tools →