Inventory & assets

Code 128 barcode

The dense, full-ASCII linear barcode behind most warehouse, tote, and carrier labels.

Also known as: Code 128 A/B/C, USS Code 128, ISO/IEC 15417

What is Code 128?

Code 128 packs the full ASCII character set into a compact linear symbol with a mandatory check character, which is why it carries most license plates, tote IDs, bin labels, and carrier tracking numbers in a modern warehouse. It has no fixed length and no built-in meaning; the system that prints it decides what the string is. GS1-128 is Code 128 with a GS1 data structure on top.

Encodes: Any ASCII text, digits, or control characters. Three code sets: A (upper case and control), B (upper and lower case), C (digit pairs, two per symbol character).

Code 128 carrying an internal shipping-lane label. The encoder switches code sets automatically to keep the symbol short.

Open Code 128 in the generator

How Code 128 is structured

Code 128 has no fixed data layout. The only structure is the code-set switching the encoder does to keep the symbol short, and the check character the scanner uses to reject a misread.

Part Length What it means
Start character 1 symbol character Start A, B, or C selects the initial code set. Encoders pick it based on the data.
Data Variable Your string. Runs of digits are packed two per character in code set C; letters use A or B.
Check character 1 symbol character Weighted mod 103 sum of everything before it. Computed by the encoder, verified by the scanner, never printed.
Stop pattern 13 modules Marks the end and lets the scanner read in either direction.

Specifications

Character set
Full 128-character ASCII, plus four function characters
Length
Variable; no formal limit, practical ceiling around 48 characters for handheld scanning
Check character
Mod 103, mandatory, not shown in the human-readable text
Density
Digits pair up in code set C, so an all-numeric string is about half the width of Code 39
X-dimension
0.19 mm minimum; 0.25 mm to 0.50 mm typical on thermal labels
Quiet zones
10X on the left and right
Symbol structure
Start character, data, check character, stop pattern; each character is 11 modules
Standard
ISO/IEC 15417

Dimensions are GS1 General Specifications targets. Confirm against the retailer’s current routing guide before a print run.

Where it is used

  • License plate numbers (LPNs) on pallets, totes, and cartons inside the warehouse
  • Bin, slot, and location labels for directed put-away and picking
  • Carrier tracking numbers on parcel labels
  • Pick lists, packing slips, and work orders scanned to confirm a step
  • Asset and equipment tags
Generated by the system

Printed by the WMS as things move

Every Code 128 label in a warehouse is generated by the system that owns the identifier: the WMS mints an LPN when a pallet is received, a location label when a slot is set up, a tote ID when a wave is released. The string is meaningful only inside that system. Nothing a trading partner scans should be plain Code 128; the moment a retailer or carrier needs to parse it, it becomes GS1-128.

Mistakes that cost money

Sending plain Code 128 where a partner expects GS1-128

Without the leading FNC1, a retailer’s scanner sees a string, not Application Identifiers. The label looks identical and fails at the DC.

Variable-length LPNs that sort wrong

Zero-pad numeric identifiers to a fixed width. LPN 99 and LPN 100 should not collide in a sort or a range scan.

X-dimension too small for the scan distance

A forklift-mounted scanner reads from a metre away. Labels sized for a handheld at arm’s length will not read from the truck.

Treating the check character as data

The mod 103 character is not part of your string and is not in the human-readable text. Systems that store the scanned value should never see it.

Direct-thermal media on long-lived labels

Direct thermal fades in heat and light. Location and asset labels that must last years need thermal-transfer ribbon.

Hand-built symbols from a barcode font

Code 128 fonts require the user to compute the check character and code-set switches. Use a real encoder.

How Endless handles Code 128

Endless assigns LPNs and tote IDs from one series across every warehouse and 3PL it orchestrates, so an identifier scanned at receiving resolves to the same unit at pick, pack, and ship. The same record then produces the GS1-128 label and the 856 when the unit leaves for a retailer.

Frequently asked questions

What is the difference between Code 128 and GS1-128?

GS1-128 is Code 128 with a FNC1 character after the start code and data organized as GS1 Application Identifiers. Plain Code 128 carries any string and means whatever your system says. GS1-128 is what a trading partner can parse.

How many characters can a Code 128 barcode hold?

There is no formal limit, but symbol width grows with every character and scanners have a maximum field of view. Keep handheld-scanned labels under about 48 characters; use code set C for long digit strings to halve the width.

Can Code 128 encode lowercase letters?

Yes, in code set B. Code set A covers upper case and control characters, code set C covers digit pairs. Encoders switch between sets inside one symbol automatically.

Should internal warehouse labels use Code 128 or a 2D code?

Code 128 is the default because every scanner in the building reads it and it is cheap to print. Move to Data Matrix or QR when the label is tiny, curved, or must survive damage, and confirm every scanner in the flow is an imager.

Related symbologies

  • GS1-128

    The Code 128 subset that carries GS1 Application Identifiers, the barcode on every carton and pallet shipping label.

  • Code 39

    The oldest alphanumeric barcode still in daily use, self-checking and printable from any font.

  • Interleaved 2 of 5

    The dense numeric barcode that ITF-14 is built on, used for internal carton and tote numbering.

Definitions in the glossary

Browse the full barcode symbology guide.

Book an Endless Commerce demo

See it on your channels.

Spend your time on the business, not the busywork. Book a demo and watch Endless run your operations across every channel you sell on.

Get a Demo