2026-04-20 Knowledge Base

Code 128 vs Code 39: Which Barcode Standard is Right for Your Business?

TL

Written by

Ready to generate barcodes?

Create high-quality labels in seconds.

Start Generator →

Set up a barcode system for a warehouse or a logistics chain and one of the first forks in the road is Code 128 versus Code 39. Both are linear, both handle letters and numbers, and at a glance they look interchangeable. They are not — and choosing the wrong one tends to surface later as labels that are too long, scans that fail, or an integration that needs more babysitting than it should.

Linear (1D) codes are still the bedrock of physical tracking. Unlike QR Codes or DataMatrix, which need a camera-based imaging scanner, a linear barcode can be read by a plain, inexpensive laser. If you are labelling storage bins, tagging assets, or organising shelves, the decision almost always comes down to these two industrial standards. Here is how they differ and how to tell which one belongs on your labels.


Code 39: the legacy pioneer

Introduced in 1974 by Intermec, Code 39 (sometimes written "Code 3 of 9") was the first alphanumeric barcode. The name describes its structure: every character is made of nine elements — bars and spaces — and exactly three of them are wide.

Character set and limits

By default Code 39 is self-checking and covers 43 characters:

  • Uppercase letters A through Z
  • Digits 0 through 9
  • A few symbols: space, -, ., $, /, +, %
  • The asterisk (*), reserved as the start and stop marker. Scanners do not pass the asterisks through; they just use them to find where the code begins and ends.

There is an extended "Full ASCII" variant that can encode lowercase and the rest of the 128 ASCII characters, but it does so by pairing two standard characters for each one (a lowercase "a" becomes +A, for example). That roughly doubles the width, which usually defeats the purpose.

What stands out

  • Low density. With nine elements per character, the code grows quickly. A 15-character serial number in Code 39 can stretch past four or five inches — often wider than the label you wanted to print it on.
  • No mandatory checksum. Standard Code 39 does not require a check digit. The self-checking structure keeps misreads uncommon, though not as rare as newer standards, and you can add an optional Modulo 43 check digit when accuracy matters more.
  • Reads on anything. Its simple thick-and-thin pattern means even decades-old laser wands decode it instantly, with no special software.

Code 128: the modern workhorse

Code 128 arrived in 1981 from Computer Identics, designed specifically to fix Code 39's size problem while adding stronger error checking and full keyboard support.

Full ASCII and subsets

Code 128 can encode all 128 ASCII characters — lowercase letters, punctuation, even control codes like carriage returns. It pulls this off without bloating the barcode by using three character subsets (A, B, and C) and switching between them mid-code as needed:

  • Subset A — digits, uppercase letters, and control characters.
  • Subset B — digits, upper and lowercase letters, and standard punctuation.
  • Subset C — numeric pairs. Instead of one digit per symbol, it encodes two digits in a single pattern. An eight-digit number like 20260525 compresses to four data characters, which keeps numeric labels short.

What stands out

  • High density. Because it uses four bar-and-space widths rather than two, Code 128 fits more into less. For the same text it typically runs 30–50% narrower than Code 39 — a real difference on small thermal labels.
  • Mandatory checksum. Every Code 128 carries a built-in check digit calculated with a weighted Modulo 103 algorithm. The generator adds it automatically, and it pushes the substitution error rate down to roughly one in several million scans.
  • The global logistics standard. Code 128 is reliable enough to underpin GS1-128 (formerly UCC/EAN-128), the standard used to label commercial shipping cartons worldwide.

Side by side

Feature Code 39 Code 128
Introduced 1974 1981
Density and size Low — long past about 8 characters High — compact, especially for numbers
Character set Uppercase, digits, 7 symbols Full 128 ASCII, including lowercase
Numeric compression None Yes — two digits per symbol in Subset C
Self-checking Yes Yes
Check digit Optional (Modulo 43) Mandatory (Modulo 103)
Typical industries US defense, automotive, electronics Global logistics (GS1), warehousing, retail shipping
Misread rate Higher Extremely low

How to choose

A few practical questions usually settle it.

Code 39 makes sense when:

  • You are on legacy hardware. Vintage inventory systems, old laser wands, or machinery without modern decoding firmware all handle Code 39 happily because it is so simple to read.
  • Your codes are short and alphabetic. A bin number like BIN-A1 or a room code like RM-102 stays a sensible length, and you do not have to think about checksums.
  • Your software is basic. If you are printing from a plain barcode font that just wraps a string in asterisks (*BIN101*), Code 39 drops in with no database plugins.

Code 128 is the better default for modern systems when:

  • Space is tight. Small items, vials, assets, document labels — Code 128's compact layout saves material and prints cleanly on small thermal printers.
  • Your data is long or numeric. Serial numbers, tracking numbers, or anything past about eight characters stays narrow thanks to Subset C compression.
  • You need lowercase or punctuation. Case-sensitive values, email addresses, and special delimiters only work natively in Code 128.
  • Misreads are costly. In medical, pharmaceutical, or high-value logistics, the Modulo 103 checksum is cheap insurance against a bad scan.

The short version

Code 39 is a rugged, simple pioneer that still earns its place in legacy military and industrial setups. But for general logistics, retail shipping, and most business inventory today, Code 128 is the standard to reach for — denser, full ASCII, and checksummed by default.

Whichever you land on, what matters in the end is that it prints crisply and scans first time. You can generate standards-compliant Code 128 or Code 39 in high-resolution SVG or PDF on BarcodeReady whenever you need one.


Related Articles

TL
Software Engineer

Tomasz is a full-stack software engineer with a background in supply chain technology and logistics systems. He built BarcodeReady to solve a real problem he encountered while working on inventory management systems: the lack of a fast, free, and standard-compliant barcode generator that works entirely in the browser without requiring uploads or account registration. BarcodeReady is his answer to that gap — built on rigorous GS1 and ISO standards research.

Ready to generate barcodes?

Create high-quality labels in seconds.

Start Generator
Back to Knowledge Base