MakeQR

CODE 128 Barcode Generator

CODE 128 is the workhorse of internal barcoding. It encodes the full ASCII set — uppercase, lowercase, digits and punctuation — more compactly than any other widely supported linear symbology, which is why warehouses, shipping labels, asset registers and library systems settled on it. There is no fixed length and no registration body involved: unlike retail codes, the numbers are yours to define, because they only have to mean something inside your own system. The encoder picks between three character subsets automatically to keep the symbol as narrow as possible, and appends a modulo-103 check character that scanners verify silently. Type your content and download a vector SVG that stays sharp at any label size, or a PNG for screen use. Nothing is uploaded — the barcode is drawn in your browser, so internal part numbers and consignment references never leave the machine you typed them on.

This content is not valid for the selected format — EAN-13 needs 12–13 digits, UPC-A needs 11–12.

Subsets A, B and C, and why they matter

CODE 128 defines three overlapping character sets. Subset A covers digits, uppercase letters and ASCII control characters; B swaps the control characters for lowercase; C is the interesting one, encoding pairs of digits in a single symbol character for double density.

A good encoder switches between them mid-symbol to minimise width, which is what this one does. The practical consequence is that a purely numeric value with an even number of digits produces a dramatically narrower barcode than the same length of mixed text — worth knowing when label width is fixed and your reference format is still up for discussion.

GS1-128 is CODE 128 with rules attached

GS1-128, formerly UCC/EAN-128, uses exactly this symbology but adds a layer of meaning: a leading FNC1 character and standard Application Identifiers that mark what follows as a batch number, expiry date, weight or serial. It is what appears on pallet labels and in regulated supply chains.

This generator produces plain CODE 128, not GS1-128. For internal asset tags, bin locations and shipping references that is exactly what you want. If a trading partner has asked for GS1-128 with specific AIs, you need software that understands those structures — a visually identical barcode carrying unstructured text will be rejected by their scanning rules.

Sizing, quiet zones and print quality

The X-dimension is the width of the narrowest bar and everything else scales from it. For labels read by handheld scanners at close range, around 0.25 mm is comfortable; smaller demands better printing. Height is a legibility matter rather than a data one — roughly 15% of the symbol width, or about 12 mm, gives a scanner enough to aim at.

Leave a quiet zone of at least ten times the X-dimension at each end, clear of borders and text. Print dark-on-light with real black rather than a rich black that can register imperfectly, and if you are using thermal transfer, check the first labels off the roll: a worn printhead thins bars in a way that reads fine to the eye and fails at the scanner.

Choosing your own numbering scheme

Because nobody assigns these numbers, the design is yours — which means it is worth doing deliberately. Fixed-length references sort and validate more easily than variable ones, and a short prefix per category makes a scanned code readable by a human as well as a machine.

Two practical cautions. Avoid encoding information that changes, such as a location, in the identifier itself; the label outlives the fact. And if the value will ever be typed by hand as a fallback, keep it short and avoid characters that are easy to confuse — the density advantage of a long alphanumeric string disappears the moment someone has to read it aloud.

Other barcode formats: all formats, EAN-13 Barcode Generator, UPC-A Barcode Generator, CODE39 Barcode Generator. Need a QR code instead? Generate one free.

Frequently asked questions

Is this barcode generator really free, and is my data uploaded?

Yes, free with no sign-up or watermark. The barcode is drawn in your browser — whatever you type is never sent to a server, so product codes and internal part numbers stay on your device.

What can a CODE 128 barcode contain?

Any ASCII character — uppercase and lowercase letters, digits, spaces and punctuation. There is no fixed length, though very long content produces a wide symbol that needs more label space to stay scannable.

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

They are subsets: A covers uppercase and control characters, B adds lowercase, and C encodes digit pairs at double density. The generator picks the most efficient subset for your content automatically.

Should I use CODE 128 or CODE 39?

CODE 128 unless a legacy system requires otherwise. It is denser and supports lowercase, so the same data produces a narrower symbol than CODE 39.

Advertisement