Code 128 vs Code 39: Differences and Which to Use

Code 128 vs Code 39: both are linear barcodes for your own data, but Code 128 holds all 128 ASCII characters and packs digits two to a character, so it makes a shorter barcode. Code 39 holds capitals, digits and seven symbols. This guide compares their characters, width and check characters, and says when to use each.

By the Barcode.codes editorial teamReviewed

The Main Differences

Code 128 encodes all 128 ASCII characters in narrow 11-module characters with a mandatory check character; Code 39 encodes 43 characters in wider ones and makes the check character optional.

Code 128 and Code 39 compared
PropertyCode 128Code 39
CharactersAll 128 ASCII characters; Latin-1 through FNC40 to 9, A to Z, space and - . $ / + %
Lowercase lettersYes, in code set BOnly in Code 39 Full ASCII, two characters each
DigitsTwo per character in code set COne per character
Width of a character11 modules16 modules at a 3:1 ratio, gap included
Start and stopStart A, B or C, and a 13-module stop* at each end
Check characterAlways, modulo 103, not printedOptional, modulo 43
StandardISO/IEC 15417ISO/IEC 16388

Which Makes a Shorter Barcode?

Code 128, for the same data: its characters are narrower, and runs of digits shrink by half because code set C packs two digits into one character.

The same text, BC-2026-0042, at the same bar width: Code 128 is 156 modules wide and Code 39 is 224 modules wide, without the quiet zones.
BC-2026-0042 at the same bar width: 156 modules in Code 128 and 224 modules in Code 39, without the quiet zones.

A Worked Example

BC-2026-0042 has 12 characters. Code 39 adds its * at each end, so 14 characters of 16 modules make 224; Code 128 needs 156 modules for the same text, check and stop character included.

The gap grows with digits: 1234567890 takes 90 modules in Code 128 and 192 in Code 39. At a bar width of 0.25 mm that is 22.5 mm against 48 mm, before the quiet zones.

Characters and Full ASCII

Code 128 holds lowercase letters and control characters directly; Code 39 needs its Full ASCII form, which writes each of them as a pair of standard characters.

Code 39 Full ASCII, also called Code 39 Extended, reaches all 128 ASCII characters through shift pairs, so every lowercase letter costs two characters. https://barcode.codes/ takes 720 modules that way, against 277 in Code 128.

The Barcode.codes scanner turns the pairs back into lowercase letters. For a hardware scanner, check in its manual whether it decodes Code 39 Full ASCII; Code 128 has no separate mode for lowercase.

Check Characters and Misreads

Code 128 always carries a check character, while Code 39 relies on its self-checking characters and adds a modulo 43 check only when the application asks for one.

Code 128: Modulo 103

The check character is the start character's value plus each character's value times its position, modulo 103. It sits before the stop character and is not printed under the bars.

Code 39: Optional Modulo 43

Each character's value from 0 to 42 is added, and the remainder after dividing by 43 is the check character: CODE39 adds up to 75, so its check character is W. Use it when the system that reads the labels expects it.

Check digit calculator works out the Code 39 modulo 43 and the Code 128 modulo 103 check characters with every step.

Which One Should You Use?

Use Code 128 for new labels, and Code 39 when an existing system, a customer or a scanner setup asks for it.

  • Code 128: the shorter barcode for asset tags, bins, parts and SKUs, with letters in both cases and digits packed in pairs.
  • Code 39: labels that must match an existing Code 39 system or a customer's specification.
  • GS1-128: GS1 data such as GTINs, batches, dates and SSCCs: Code 128 with FNC1 and GS1 Application Identifiers.

Code 128 barcode generator draws Code 128 with automatic or forced code sets.

Code 39 barcode generator draws Code 39 and Code 39 Full ASCII, with an optional check character.

Frequently Asked Questions

Can a Scanner Read Both Code 128 and Code 39?

The Barcode.codes scanner and reader read both. A hardware scanner reads the symbologies switched on in its settings, which its manual lists.

Does Code 128 Support Lowercase Letters?

Yes. Code set B holds lowercase and uppercase letters, digits and punctuation, and the encoder switches code sets as the data needs.

Why Does Code 39 Text Show Asterisks?

The asterisk is Code 39's start and stop character, so it sits at both ends of every Code 39 barcode. It is not part of the data, even when the text under the bars shows it.

Can I Switch From Code 39 to Code 128?

Yes for the data: every Code 39 character is also an ASCII character that Code 128 holds. Check first that every system and scanner that reads your labels accepts Code 128.

Sources

The facts in this guide come from these sources, checked on October 8, 2026; the widths are measured with the generator's encoder.

GS1 General Specifications, Release 26.0, ratified January 2026 defines the GS1 identification keys, barcodes and Application Identifiers; the text names the sections used.

BWIPP symbology references (Code 128, Code 39, Data Matrix, PDF417, Aztec Code, MaxiCode) documents the character sets, sizes and standards of the encoder the generator uses.