Opo Codes

Code 128 barcode generator

Code 128 is the barcode to use when your code has letters, digits and symbols, such as OPO-0001 on a shipping label or a stock code. Opo Codes draws it free in your browser, checks the scan, and exports PNG, SVG or PDF. It encodes the text you type and does not issue official product numbers.

Open the generatorFree. Runs in your browser.

How to do it

  1. Open the generator with Code 128 already selected.
  2. Type your text, letters and digits as printed, for example OPO-0001.
  3. Look at the scan stamp. Upper and lower case count, so the scan must return exactly what you typed.
  4. Choose PNG, JPG, SVG or PDF, set the bar width for your label, then download.

What Code 128 can hold

Any plain keyboard character: the 95 printable ASCII characters, which means capitals, lowercase letters, digits, space and the usual symbols. Accents and Bangla letters are refused with a message. If you need those, use a 2D code such as Data Matrix.

There is no check digit to type. Code 128 carries its own check character inside the symbol and the generator adds it. Compare Code 39, which only takes capitals and a few symbols.

Worked example: how wide will it be

Every symbol is 11 modules wide, plus a start symbol, a check symbol and a 13-module stop. Digits are packed in pairs, so numbers print narrower than letters. OPO-0001 uses four letter symbols, then switches to digit pairs for 0001 and is 112 modules wide, 37 mm at the default 0.33 mm bar width. The digits-only 20240001 is 79 modules, 26 mm.

Twenty capital letters come to 255 modules, about 84 mm. So the length of your text decides the label width, and a long code on a small label needs a thinner bar. Keep the bar width at 0.25 mm or more, because the generator warns below that.

Print it so it scans

Leave the quiet zone: the default is 11 bar widths on each side. Use dark bars on a light background, and set a bar height that suits your label, 18 mm by default. Contrast under 4.5 to 1 gets a warning.

Code 128 is for text you read yourself. It has no rule for batch or expiry fields. For those, use GS1-128. Download SVG or PDF for printing, or PNG at 300 or 600 DPI for a thermal printer driver that takes pictures.

Questions

Does Code 128 care about upper and lower case?

Yes. A and a are different characters, and the scan check requires an exact match.

Is there a length limit?

The generator sets no limit, but each character adds 11 modules, so a long text needs a wide label or thinner bars.

Code 128 or Code 39?

Code 128 holds more characters and is narrower for the same text. Use Code 39 only when a system asks for it.

Can I use it as a product barcode in shops?

Shops usually expect EAN-13 or UPC-A with a number from GS1. Code 128 is for labels you control, like shipping and stock.

Related tools