ToolGenie

Code 128 Barcode Generator

Any text or number as a Code 128 barcode — one at a time or a numbered sequence.

Loading tool…

How to use Code 128 Barcode Generator

  1. Type any text — letters, digits and symbols are all valid in Code 128. Invalid characters (accents, emoji) are flagged straight away.

  2. Need numbered labels? Switch to Sequence, set a prefix such as SKU- and a start number, and choose how many to generate.

  3. Set the bar height and width to fit your label, and show or hide the text under the bars.

  4. Download PNG or SVG for a single code, or a ZIP of PNGs plus a CSV manifest for a whole batch.

Why Code 128 is the barcode for everything that is not a retail product

EAN and UPC exist for one job: identifying a product at a till, with a number GS1 assigned. Everything else — the shelf location in a warehouse, the serial number on a laptop, the asset tag on a chair, the tracking number on a parcel, the ID on a membership card — needs a barcode that encodes whatever text you already use, and that is Code 128. It takes all 128 ASCII characters, upper and lower case, digits and punctuation, packs them densely, and carries its own check character so a misread bar is caught by the scanner rather than becoming a wrong record.

The generator encodes whatever you type, switching internally between the three Code 128 character sets to keep the bars as short as possible — long runs of digits are compressed two per symbol. What it will not encode is anything outside ASCII: an accented letter or an emoji is flagged immediately with the reason, because the alternative is a barcode that looks fine and scans as garbage. For text like that, or for anything longer than about forty characters, a QR code is the right tool and the QR generator is one click away.

Numbered labels: sequences and batches without a spreadsheet

The typical Code 128 job is not one barcode but a run of them: asset tags 0001 to 0500, sample IDs for a lab, shelf labels A-01 through A-40, tickets for an event. Switch to Sequence, set a prefix such as ASSET- and a suffix if you need one, a start number, how many to produce and how many digits to zero-pad to, and the whole run is generated as a ZIP of PNGs — one file per label, numbered and named after its content so they drop straight into a label template. A CSV manifest in the ZIP lists every file beside its value, ready to be imported into the inventory system the labels will be scanned into.

If the values already exist in a spreadsheet, Batch is the other route: paste the column, one value per line, up to 500 at a time. Every entry is validated first; anything that cannot be encoded is listed and skipped instead of silently producing a bad label. Bar width, height, colours and whether the text prints under the bars are set once for the whole set, so the run comes out uniform.

  • Any ASCII text: letters, digits, symbols, mixed case
  • Sequence mode: prefix + start number + count + zero padding → ZIP
  • Batch mode: one value per line, up to 500, validated and named
  • PNG at up to 4× for label printers, SVG for print artwork

Getting labels that scan: size, contrast and quiet zone

Code 128 gets wider with every character, and a scanner reads it by the relative widths of the bars — so the two settings that matter are module width and print size. Keep the bar width at two to three pixels per module and download at 3× or 4× for a thermal label printer, or as SVG for anything going through a design file, so the bars stay exact when scaled. Leave the quiet zone — the blank margin either side — at its default; trimming it is the most common reason a printed Code 128 will not read. Dark bars on a light background, always: laser scanners do not see red.

Every step runs inside your browser, using the WebAssembly and Canvas APIs your device already ships with. No file is uploaded, no copy is kept, and nothing sits in a queue on a server waiting to be deleted — which is also why the tool keeps working with the network disconnected.

That is worth more than it sounds for Code 128 specifically, because what people encode is internal by definition: serial numbers, customer IDs, warehouse layouts, ticket numbers. None of it should sit in a third party's logs because you printed a label, and none of it has to. There is no account, no watermark and no per-code limit for the same reason — the work is done by your own browser, so there is nothing to meter.

Frequently Asked Questions

What can a Code 128 barcode contain?

Any of the 128 ASCII characters: upper and lower case letters, digits, punctuation and symbols. Accents and emoji are not ASCII, so they are rejected — transliterate them or use a QR code instead.

How long can a Code 128 barcode be?

There is no fixed limit in the standard, but the code gets wider with every character and scanners struggle beyond about 40–50. Keep labels short; for longer content a QR code is the right format.

What is the difference between Code 128 and Code 39?

Code 128 is denser, encodes lower case and more symbols, and includes a check character. Code 39 is older and larger but still read by every scanner; pick it only if a legacy system requires it.

What can a Code 128 barcode contain?

Any of the 128 ASCII characters: upper and lower case letters, digits, punctuation and symbols. Accents and emoji are not ASCII, so they are rejected — transliterate them or use a QR code instead.

How long can a Code 128 barcode be?

There is no fixed limit in the standard, but the code gets wider with every character and scanners struggle beyond about 40–50. Keep labels short; for longer content a QR code is the right format.

What is the difference between Code 128 and Code 39?

Code 128 is denser, encodes lower case and more symbols, and includes a check character. Code 39 is older and larger but still read by every scanner; pick it only if a legacy system requires it.

Can I generate sequential barcodes, like 0001 to 0500?

Yes. Sequence mode takes a prefix, a start number, a count (up to 500) and a zero-padding width, and downloads the whole run as a ZIP of PNGs with a CSV manifest.

Does Code 128 include a check digit?

Yes, a check character is computed and encoded automatically as part of the standard. It is not printed in the human-readable text, and you never need to add it yourself.

Related tools

Looking for something else? Browse all generators.