Skip to the tool

Code 128 generator

The barcode for your own systems: asset tags, tote labels, job references. It encodes text as happily as numbers, and nobody has to license anything.

Guide

How to use it

  1. Type the data, letters, digits and common symbols all encode. Keep it under about 20 characters for comfortable label sizes.
  2. Keep the printed digits on unless your label template repeats the text elsewhere, humans need a fallback when the scanner dies.
  3. Download SVG for the label printer, PNG for documents.
  4. Test one label with your actual scanner before the batch run, thermal printer density settings matter.

Examples

Labelling schemes that scale

AST-2026-0042

Asset tags with a year and sequence survive audits: the prefix says what it is, the year says when it entered service, the number is unique forever, never reuse retired numbers.

LOC-A3-S2

Warehouse locations as aisle-bay-shelf codes turn stocktakes into scanning walks. Short codes print big, and big scans fast from a forklift.

JOB-8814-P2

Work orders with a part suffix let one scan log both the job and the stage. The hyphens cost little in Code 128’s compact digit mode.

Method

How it works

Code 128 encodes the full ASCII set using three switchable subsets, with a mandatory modulo-103 checksum bar computed automatically, unlike EAN there is no check digit for you to manage, the symbology carries its own. JsBarcode selects the densest encoding (digit pairs compress to single symbols) so numeric codes print pleasingly compact.

Rendering is local SVG with 3× PNG rasterisation, and the quiet zones are included, label templates should not crop them.

FAQ

Frequently asked questions

Code 128 or Code 39?

Code 128, in almost all new systems: denser, full character set, built-in checksum. Code 39 persists only where legacy scanners or standards demand it.

How long can the data be?

Technically long, practically about 20 to 25 characters before labels become unwieldy. If you need more, encode a short ID and keep the detail in your database.

Will any scanner read it?

Every commercial laser and camera scanner made this century reads Code 128, it is the GS1-128 base symbology used across logistics.

Can I encode spaces and symbols?

Yes, spaces, hyphens, slashes and most punctuation encode fine. Avoid characters your own software treats specially, hyphens beat slashes in filenames, for instance.

Why do my thermal labels scan poorly?

Density (darkness) set too low, or print head grime, both blur bar edges. One test label and a head clean fix most of it.

Is my data sent anywhere?

No, encoding happens in your browser. Internal reference schemes stay internal.

More tools

Related tools

Barcode generatorAll formats, one tool. EAN-13 generatorThe retail format with GS1 rules. QR code generatorFor URLs and richer payloads. Random number generatorSeed a numbering scheme without collisions.
Skip to the tool

Code 128 generator

The barcode for your own systems: asset tags, tote labels, job references. It encodes text as happily as numbers, and nobody has to license anything.

Code 128 encodes letters, digits and symbols. 16 characters.

TOOLS-CASSAM-001

Bars are drawn on your device (self-host the JsBarcode library on deploy). Numbers you encode are never sent anywhere.

Guide

How to use it

  1. Type the data, letters, digits and common symbols all encode. Keep it under about 20 characters for comfortable label sizes.
  2. Keep the printed digits on unless your label template repeats the text elsewhere, humans need a fallback when the scanner dies.
  3. Download SVG for the label printer, PNG for documents.
  4. Test one label with your actual scanner before the batch run, thermal printer density settings matter.

Examples

Labelling schemes that scale

AST-2026-0042

Asset tags with a year and sequence survive audits: the prefix says what it is, the year says when it entered service, the number is unique forever, never reuse retired numbers.

LOC-A3-S2

Warehouse locations as aisle-bay-shelf codes turn stocktakes into scanning walks. Short codes print big, and big scans fast from a forklift.

JOB-8814-P2

Work orders with a part suffix let one scan log both the job and the stage. The hyphens cost little in Code 128’s compact digit mode.

Method

How it works

Code 128 encodes the full ASCII set using three switchable subsets, with a mandatory modulo-103 checksum bar computed automatically, unlike EAN there is no check digit for you to manage, the symbology carries its own. JsBarcode selects the densest encoding (digit pairs compress to single symbols) so numeric codes print pleasingly compact.

Rendering is local SVG with 3× PNG rasterisation, and the quiet zones are included, label templates should not crop them.

FAQ

Frequently asked questions

Code 128 or Code 39?

Code 128, in almost all new systems: denser, full character set, built-in checksum. Code 39 persists only where legacy scanners or standards demand it.

How long can the data be?

Technically long, practically about 20 to 25 characters before labels become unwieldy. If you need more, encode a short ID and keep the detail in your database.

Will any scanner read it?

Every commercial laser and camera scanner made this century reads Code 128, it is the GS1-128 base symbology used across logistics.

Can I encode spaces and symbols?

Yes, spaces, hyphens, slashes and most punctuation encode fine. Avoid characters your own software treats specially, hyphens beat slashes in filenames, for instance.

Why do my thermal labels scan poorly?

Density (darkness) set too low, or print head grime, both blur bar edges. One test label and a head clean fix most of it.

Is my data sent anywhere?

No, encoding happens in your browser. Internal reference schemes stay internal.

More tools

Related tools