Skip to content

Code 128 Generator

Encode letters, numbers and symbols in a compact barcode.

Letters, digits, punctuation and spaces (any ASCII or Latin-1 character), up to 80.

Units
mm
mm
Human-readable text
Rotation

Put a tree, a shape or your own picture inside the bars.

SVG and PDF are vectors: sharp at any size, best for print.

Made in your browser. Nothing is uploaded.

More Barcode Tools

All tools

How to use the code 128 generator

Three steps, all in your browser.

  1. 1

    Enter your data

    Type or paste the number or text to encode. Errors are explained.

  2. 2

    Adjust the barcode

    Change the options if you need to. The preview updates as you type.

  3. 3

    Download

    Save the result and print it. Test a printed sample before a big run.

Code 128 Generator: what to know

Code 128 is the workhorse barcode for anything that isn't a retail product: shipping labels, inventory and asset tags, documents, tickets and work orders. It encodes all 128 ASCII characters, so upper and lower case letters, digits and punctuation all work, and it's denser than older symbologies such as Code 39.

Code 128 has three code sets, A, B and C, and switches between them inside one barcode. Set C stores two digits per symbol character, so long numbers become about half the length. The generator picks the shortest combination for your data and adds the mandatory mod 103 check character before the stop pattern; scanners check it and don't show it.

If a customer or carrier asks for GS1-128 rather than plain Code 128, use the GS1-128 generator instead: it's the same symbology but starts with an FNC1 character and organizes the data in GS1 Application Identifiers.

Popular uses

  • Warehouse bin, shelf and pallet location labels
  • Asset tags for equipment, IT and tools
  • Order, invoice and document numbers on paperwork
  • Membership cards, tickets and wristbands

Tips for the best result

  • Numbers with an even count of digits encode most compactly in code set C.
  • Leave a quiet zone of at least 10 times the narrowest bar on each side.
  • Keep data short where you can: every character makes the barcode wider at the same bar width.

Read how JustYourBarcode works and our privacy details. Numbers, pictures, CSV files and camera frames are processed in your browser and are never sent to our server. A barcode doesn't register a product number: retail UPC and EAN numbers come from GS1.

Frequently asked questions

All 128 ASCII characters: upper and lower case letters, digits, punctuation and control characters. It switches between three code sets as it goes, and code set C packs two digits into each symbol character, which makes long numbers especially short.

Yes, and it's always included: a modulo 103 check character is calculated from your data and placed before the stop pattern. Scanners verify it and don't show it, so you don't type it yourself.

GS1-128 is Code 128 with a special FNC1 character at the start and data written as GS1 Application Identifiers, such as (01) for a GTIN or (17) for an expiry date. Use plain Code 128 for your own labels and GS1-128 when a trading partner asks for it.

No. Barcodes are drawn in your browser, and camera frames, pictures and CSV files are processed on your device. Nothing is stored and nothing is sent to our server, and it's all gone when you close or reload the page.

No. A barcode is a picture of a number. Retail product numbers (GTINs such as UPC and EAN) are licensed from GS1, which links them to your company; making a barcode image here doesn't assign or register a number. Retailers and marketplaces may check numbers against GS1's records.

Yes. Every tool is free with no sign-up and no limits on use, including commercial use of the barcodes you make. Clearly labeled ads keep it that way.

Yes. The tools work in any modern browser on phones, tablets and computers, and the scanner uses your phone's camera.