Barcode Generator (Code 128)

Make a scannable Code 128 barcode for product labels, inventory, asset tags, library cards or event passes. Type the text or number to encode, set the bar height and choose whether to print the text under the bars, then download a sharp PNG or a scalable SVG. Code 128 handles letters, digits and common symbols, which suits internal labelling.

Tools

Loading tool…

At a glance

Symbology
Code 128 with automatic switching to compact digit mode for long number runs
Input
1 to 80 printable ASCII characters
Output
PNG (2× resolution) or SVG
Options
Bar height 30 to 300 pixels; text under the bars on or off

How it works

  1. Type the value

    Letters, digits, spaces and common symbols, up to 80 characters.

  2. Adjust the look

    Set the bar height and choose whether to show the text.

  3. Download

    Save a PNG for documents or an SVG for printing at any size.

Barcode or QR code?

Pick the code your scanner and use case need.

OptionBest forTrade-off
Barcode Generator (this page)Labels read by handheld scanners.Holds short text only.
QR Code GeneratorLinks and text read by phone cameras.Many laser scanners cannot read QR codes.
Digital Business Card QRContact details in a QR code.Not for inventory.
ID Card MakerCards that can carry a barcode image.Add the barcode PNG to the design.
UUID GeneratorUnique values to encode.UUIDs make long barcodes; shorter codes scan better.

Example: an asset tag

You want to label a laptop with the asset code SMF-2026-0001.

  1. Type SMF-2026-0001 and keep the height at 80 pixels with the text shown.
  2. Check the preview, then press Download PNG and add the image to your label sheet.
  3. For a printed sticker that must stay sharp at any size, download the SVG instead.
  4. Test-scan the printed label with your scanner before labelling everything.

When to use Barcode Generator (Code 128)

Use it for inventory and asset labels, parcel and order references, library and membership cards, event entry passes and any internal process where a scanner should read a code faster and more reliably than typing.

How Code 128 works

Each character becomes a pattern of three bars and three spaces of varying widths. The symbol starts with a start code, ends with a stop code and includes a check character computed from all the others, so scanners can detect a misread.

Compact numbers

Code 128 has a mode that packs two digits into one symbol. The generator switches to it automatically for runs of digits, which makes numeric codes shorter and easier to scan.

Quiet zones and printing

The white space on both sides is part of the barcode. Scanners need it to find the start and end, so do not crop it, and print the bars dark and crisp on plain white.

Code 128 compared with other barcodes

EAN-13 and UPC-A are fixed-length numeric codes used on retail products and need numbers issued by GS1. Code 39 is older and holds fewer characters per centimetre. Code 128 is compact, handles letters and digits, and is the usual choice for shipping labels, asset tags and internal inventory, which is why this generator uses it.

Printing labels that scan first time

Print at a size where the narrowest bar is at least about 0.25 mm wide, use black on white, and keep the white margin on both sides. Thermal label printers give the sharpest bars. Test one printed label with the actual scanner before printing a whole sheet, especially on glossy or textured label stock.

If something looks wrong

An error mentions printable ASCII
Code 128 here supports letters A–Z, digits and common symbols. Remove accented letters, emoji or Hindi text.
The scanner does not read the label
Print larger, keep the white margins on both sides, and use dark bars on a white background.
The barcode is too wide
Shorten the value. Long runs of digits are encoded compactly, but letters take more space.
The text under the bars is cut off
Download the SVG, or keep the text option on and avoid cropping the image.

Common questions

Can I print many different barcodes at once?

Generate and download each one, then arrange them on a page; bulk generation is not available.

Does the SVG keep sharp edges when enlarged?

Yes. SVG is a vector format and stays sharp at any size.

Is the value sent anywhere?

No.

Can I make EAN or UPC barcodes for retail products?

No. Retail product barcodes must use numbers issued by GS1. This tool makes Code 128 barcodes for your own labels and internal use.

Which scanners can read Code 128?

Almost all handheld barcode scanners and most phone scanning apps read Code 128.

Is there a watermark?

No. The barcode is created in your browser and downloads without any mark.

Barcodes are drawn in your browser and the encoded value is not sent to SortMyFile.