Code 128 Barcode Generator

Make a Code 128 barcode for a SKU, asset tag, order number, or shelf label. Type any mix of letters, numbers, and symbols, and download the barcode as a PNG or SVG.

2. Size and text

Bar width
2 px

Width of the thinnest bar. Raise it for a larger, sharper PNG.

Bar height
100 px
Margin (quiet zone)
10 bar widths
Text size
20 px

3. Colors

Loading the barcode maker…

Print a test copy and scan it before you print a full batch.

What is a Code 128 barcode?

Code 128 is a barcode that can hold letters, numbers, and symbols. It is the usual choice for labels a business makes for itself, such as inventory, shipping, and asset labels, because it fits more into less width than older barcodes like Code 39.

Unlike UPC and EAN, Code 128 has no registration or numbering rules. You choose the content, so you do not need to buy numbers from GS1.

Why use our Code 128 barcode generator

  • ·Shortest barcode for your content. Code sets are picked and switched automatically.
  • ·Clear errors. If a character cannot be encoded, the tool names it instead of silently dropping it.
  • ·Label-ready files. PNG for label printer software, SVG for design files.
  • ·Free and private. No account, no watermark, and your codes stay on your device.

How to make a Code 128 barcode

  1. 1

    Type your text or number

    Enter a SKU, order number, asset tag, or any short text. Letters, digits, spaces, and keyboard symbols are allowed.

  2. 2

    Let the tool pick the code sets

    The tool chooses code set A, B, or C as it goes, switching to set C for runs of digits so the barcode stays short.

  3. 3

    Size the barcode for your label

    Set the bar width and height and keep a margin of at least 10 bar widths. Turn the text off if your label already prints it.

  4. 4

    Download and print

    Download a PNG for label printer software or an SVG for design files, then print one label and scan it.

Code 128 code sets A, B, and C

Code 128 has three character sets. A barcode can start in one and switch to another partway through, so each part of your content uses the set that fits it best.

SetHoldsBest for
Code set ACapital letters, digits, punctuation, and control charactersOlder systems that send control characters such as tab or enter
Code set BCapital and small letters, digits, and punctuationOrdinary text like SKU-10482 or Order #5521
Code set CPairs of digits, 00 to 99, in one characterLong runs of numbers, which it fits in half the space

How to keep a Code 128 barcode short

Each Code 128 character takes 11 bar widths, plus a start character, a check character, and a stop pattern. Set C packs two digits into one character, so numbers take about half the room of letters. Widths below are in bar widths, before margins:

ContentWith set C (this tool)Set B only
1234567879123
123456789090145
  • ·Group digits together. ABC123456 is 112 bar widths wide, but the same characters mixed up as 1A2B3C456 take 134, because scattered digits cannot use set C.
  • ·Use an even number of digits. Set C works in pairs, so an odd run leaves one digit over. A123456 is exactly as wide as A12345 (90 bar widths), so if your numbering allows it, the extra digit is free.
  • ·Drop prefixes that never change. If every asset tag starts with the company name, leave it on the printed label and out of the barcode.

Who uses Code 128 barcodes

  • ·Warehouses and stockrooms. Label bins, shelves, and locations with codes like A-03-12 so pickers can confirm the spot with a scan.
  • ·Online sellers. Put your own SKU on products, bags, and packing slips to speed up picking and packing.
  • ·IT and facilities teams. Print asset tags for laptops, monitors, and tools that match the IDs in your asset list.
  • ·Event and membership desks. Add a member or ticket number to badges and cards that a handheld scanner can check in.

Code 128 barcode FAQ

What characters can a Code 128 barcode hold?
The Code 128 standard covers all 128 ASCII characters. This tool accepts the printable ones: capital and small letters, digits, spaces, and the symbols on a standard English keyboard. Accented letters and emoji cannot be encoded.
Does Code 128 have a check digit?
Yes. Every Code 128 barcode ends with a check character worked out from the rest of the content (modulo 103). It is added automatically and is not printed in the text, so you never type it.
How long can a Code 128 barcode be?
The standard sets no fixed limit, but every character adds width, and scanners must see the whole barcode in one pass. This tool accepts up to 200 characters. In practice, keep it short enough to fit your label at a bar width your printer can print cleanly.
What is the difference between Code 128 and Code 39?
Code 128 holds small letters and all keyboard symbols, and it is much more compact, especially for numbers. Code 39 only holds capital letters, digits, and a few symbols, but some older systems still require it.
Is Code 128 the same as GS1-128?
GS1-128 is a stricter use of Code 128 for supply chain labels. It starts with a special character and stores data in numbered fields, such as (01) for a product number and (17) for an expiry date. This tool makes plain Code 128, which suits your own labels but not GS1-128 shipping labels.
Can a phone scan a Code 128 barcode?
Yes, with a barcode scanning app, which shows the text it reads. For a link people should open on their phones, a QR code works better, since phone cameras such as the iPhone Camera app offer to open QR code links.
Is my text uploaded?
No. The barcode is made in your browser, and the text you type stays on your device.