CodeBox Hub
FREE

Code 39 Barcode: The Industrial Workhorse That Refused to Die

Code 39 explained: its 43-character set, asterisk start/stop, the optional mod-43 check digit, and why military and automotive still print it.

# Code 39 Barcode: The Industrial Workhorse That Refused to Die

Code 39 is a variable-length one-dimensional barcode developed in 1974 that encodes 43 characters: uppercase A-Z, digits 0-9, a space, and the six punctuation marks dash, period, dollar sign, slash, plus and percent. Every symbol is framed by an asterisk (*), which serves as both start and stop. It has no built-in check digit, although a mod-43 check is an optional extension. According to Wikipedia, it is defined in ISO/IEC 16388 and remains the standard for military, automotive and many legacy asset-tracking lines.

The 43-Character Set

CategoryCharactersCount
Uppercase lettersA-Z26
Digits0-910
Space(space)1
Punctuation- . $ / + %6
Encodable data total-43
Start/stop delimiter*1 (not encodable as data)

Because there are no lowercase letters, the human-readable text above the bars is always uppercase. If your data contains lowercase or mixed case, Code 39 cannot hold it — that is the single most common reason teams move to Code 128.

Structure: 9 Elements per Character

Each character is five bars and four spaces — nine elements — of which three are wide and six are narrow. The wide-to-narrow ratio is usually set between 2:1 and 3:1 at print time. The asterisk is asymmetric, so a scanner can tell the reading direction from it. The format is deliberately simple: no start code to learn, no set switching, and no mandatory check, which is exactly why a barcode font can render it on any old printer. Another quirk of that simplicity: every character is self-contained, so a reader that catches a contiguous slice of bars can report partial content. That made Code 39 forgiving for long serial plates scanned at an angle, where the full symbol rarely sits flat in the window.

Optional Mod-43 Check Digit

Code 39 does not require a check digit, but most industrial deployments add one. In the common mod-43 scheme, digits 0-9 carry values 0-9, letters A-Z carry 10-35, and the space plus six punctuation marks carry 36-42; the check character is the weighted sum modulo 43, mapped back to the same 43-character table. The value table is fixed by the symbology, so a tool and a reader that disagree about character values will produce or reject a different check character — confirm both sides use the same table before blaming the printer.

Worked example: the string ABC1.

PositionCharacterValueWeightProduct
1A10110
2B11222
3C12336
41144
-Sum--72
-72 mod 4329-check character = J

So the printed code reads ABC1J (asterisks shown as part of the code). The related variant Code 32 is simply Code 39 with a mandatory mod-43 check and a leading 4.

Where Code 39 Still Runs

  • Military: asset and serial labels under MIL-STD-style practices are a long-standing Code 39 domain.
  • Automotive and aerospace: legacy tooling, parts bins and test equipment.
  • Oil, gas and utilities: pipeline markers and field equipment tags printed with basic barcode fonts.
  • Postal heritage: some postal services still print Code 39, although the Universal Postal Union recommends Code 128.
  • Hospital wristbands: Code 39 was the default patient-identifier symbology in many US hospitals before Code 128 and, more recently, QR-based wristbands took over, so legacy ward readers still expect it.
  • DoD marking: US military property labels follow MIL-STD-130, which specifies Code 39 — one reason the symbology never lost the government-funded reader base that keeps it alive.

Code 39 vs Code 128, Measured

We encoded the same test IDs in both symbologies with the barcode generator and measured the rendered widths at an identical narrow-module size:

Test dataCode 39 widthCode 128 widthDelta
25 mixed-case characters364.5 units310 modulesCode 128 about 15% narrower
24 digits351 units167 modules (Set C)Code 128 about 52% narrower
16-character VIN (A-Z, 0-9)243 units209 modules (Set B)Code 128 about 14% narrower

For short labels the two are close, but on long numeric IDs Code 128 wins by a wide margin — and it has a mandatory check digit. Code 39's remaining edge is compatibility: nearly every reader that decodes barcodes decodes Code 39, and no software is needed to generate it. If you are deciding between the two for a new line, start from EAN-13 vs Code 128 and the symbology overview before committing, and use the label maker for mixed text-and-code layouts.

Common Printing Errors

  • Double asterisks. Paste data that already contains * and the generator adds its own frame, producing a symbol like DATA that no reader accepts. The asterisk is framing, not data — strip it from the input.
  • Ratio drift. Printing from a 96-dpi screenshot and scaling it up distorts the wide-to-narrow ratio below the 2:1 floor, which shows up as intermittent reads that work at some angles and fail at others. Export SVG or PDF and let the RIP set the ratio.
  • Quiet zone too small. Code 39 needs at least 10 times the narrow-bar width of clear space on each side. A logo or text line crowding the symbol creates a false start pattern, and the reader locks onto the wrong edge.
  • Check-digit mismatch. Adding a mod-43 check when the receiving system expects raw data (or vice versa) makes the last character look like a data error. Agree on the pattern before printing the first label, because re-printing a full asset run is the expensive part.
  • Non-uniform scaling. Stretching the symbol to fit a label changes the ratio in one axis only; a 20% horizontal stretch is enough to push the symbol below the reader's ratio tolerance even though it looks fine.

FAQ

Does Code 39 have a check digit?

No built-in one. Most deployments add an optional mod-43 check character computed as a weighted sum modulo 43, and the Code 32 variant makes it mandatory with a leading 4.

What characters can Code 39 encode?

Uppercase A-Z, digits 0-9, a space, and six punctuation marks: dash, period, dollar sign, slash, plus and percent. No lowercase letters and no other symbols.

What is the difference between Code 39 and Code 93?

Code 93 was designed to fix Code 39's low density: it encodes the same characters plus extras in fewer elements per symbol and includes a mandatory check. Code 39 survives mainly for legacy readers and font-based printing.

Why does the military still use Code 39?

Inertia and standards: military asset-labeling practices standardized Code 39, existing inventory is labeled with it, and the symbology reads on any general-purpose scanner.

Can Code 39 encode lowercase letters or Chinese?

Neither. The character set is 43 uppercase characters and symbols only. For mixed case use Code 128; for CJK text use a 2D code such as a QR code.

How long can a Code 39 barcode be?

The spec does not fix a maximum; practical limits are label space and scanner window. Around 25 characters is a common rule of thumb before the symbol gets hard to read at typical print sizes.

Can I generate a Code 39 barcode online for free?

Yes. The free Code 39 generator renders Code 39 with or without the mod-43 check and exports SVG or PNG; see the free barcode generator guide for all supported symbologies.

Keep reading

Contact us