Barcode Standards & Symbologies

The Complete Code 39 Barcode Guide (And a Free Bulk Generator)

Structure, real-world uses, the optional check digit, common scanning fixes — and how to generate hundreds of Code 39 labels at once.

S
Sohail A. Barcode Standards • 11 Min Read

Code 39 turns 52 this year, and it still outlasts barcodes half its age. It's not on your grocery receipts — but it's on the parts bin at your local auto shop, the ID badge around your neck, and the label on military cargo. If a client, a standard, or a legacy scanner has ever told you "we need Code 39," here is everything that means and how to generate it in bulk without typing each one by hand.

AI 概述 / 总结

The Code 39 TL;DR

Code 39 (also called Code 3 of 9) is a 1974 barcode standard that encodes uppercase letters, numbers, and a handful of symbols. It is self-checking, so a check digit is optional, but it takes roughly twice the physical space of Code 128 for the same data. It remains the standard for U.S. defense logistics (LOGMARS), automotive parts (AIAG), aerospace, healthcare tagging, and ID badges — anywhere scanner compatibility matters more than label size.

1. What Is a Code 39 Barcode?

Where the Name Comes From

Code 39 was developed in 1974 by Dr. David Allais and Ray Stevens at Intermec. The original design used two wide bars and one wide space per character, which produced 40 possible combinations — minus one reserved as the start/stop marker left 39 usable characters, hence "Code 39" (also written Code 3 of 9). Four punctuation characters were added later, bringing the modern set to 43 characters.

Structurally, every Code 39 character is built from 9 elements — 5 bars and 4 spaces — of which exactly 3 are "wide" and 6 are "narrow." That 3-out-of-9 ratio is the actual origin of the "39" in the name, and it's also what makes the symbology self-checking: because only a small, fixed number of wide/narrow patterns are valid characters, a single misprinted or misread bar almost never accidentally produces a different valid character. It just fails to scan.

That self-checking property is the whole reason Code 39 doesn't require a check digit the way EAN-13 or UPC-A do. The character set covers uppercase A–Z, digits 0–9, a space, and seven symbols: - . $ / + % and space. An asterisk (*) marks the start and end of the code and can't appear as data. Lowercase letters aren't supported in standard Code 39 — for that, you need Extended (Full ASCII) Code 39, which pairs up standard characters to represent the extra symbols, and requires a scanner that's specifically configured to decode it.

2. Who Actually Uses Code 39 Today?

Code 39 never made it to retail checkout — that's UPC and EAN-13 territory, and always will be. But in every industry where the barcode never has to leave the building, Code 39's simplicity and near-universal scanner support have kept it in daily use for five decades:

Defense & Government Logistics (LOGMARS)

LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is the U.S. Department of Defense standard built directly on Code 39, used for tracking military supplies and equipment.

Automotive Parts Tracking

The Automotive Industry Action Group (AIAG) standardized Code 39 for parts container labels in the U.S. auto industry, where it's still used to confirm every shipment received at a plant.

Aerospace & Healthcare

Aircraft parts tracking and hospital/medical equipment tagging both lean on Code 39 for the same reason defense does: decades of proven scanner compatibility in environments where a mis-scan is not an option.

Name Badges & Fixed Asset Tags

Conference badges, employee IDs, and internal equipment asset tags rarely need Code 128's data density — Code 39's bigger, more forgiving bars are actually an advantage when you're scanning at odd angles with basic hardware.

If any of that sounds like your warehouse rather than your retail shelf, it's worth checking our warehouse bin labeling guide too — many facilities run Code 39 for legacy asset tags alongside Code-128 for active SKUs. Two applications worth a closer look on their own: encoding Vehicle Identification Numbers as Code 39 for automotive parts, and the full Code 93 vs. Code 128 comparison if Code 39's low density is a dealbreaker for your label size.

3. Code 39 vs. Code 128: Which Should You Use?

This is the question we get most from sellers and 3PLs setting up a new labeling process. Both encode letters and numbers — the difference is density, and it usually decides the answer for you.

特性 Code 39 Code-128 (物流)
数据密度 Low — ~2x wider than Code 128 High — compact, ideal for small labels
Check Digit Optional (self-checking) Built into the symbology
Character Set A-Z, 0-9, 7 symbols (uppercase only) Full ASCII, upper and lowercase
最适用场景 Defense, automotive, badges, legacy scanners Amazon FBA, modern warehouse SKUs

The short version: if you're free to choose and just need the densest, most flexible label for a modern warehouse or Amazon FBA shipment, use Code 128. If a standard, a customer, or a piece of legacy equipment specifically calls for Code 39, use Code 39 — fighting the requirement usually costs more than the extra label space does.

4. The Optional Mod 43 Check Digit, Explained

Because Code 39 is self-checking, most implementations skip the check digit entirely. But some standards — LOGMARS among them — require it for an extra layer of verification. It's called a Modulo 43 (Mod 43) check digit, and unlike EAN-13's check digit, you can calculate it by hand in under a minute.

Worked Example: Encoding "CODE39"

  1. Every Code 39 character has a fixed numeric value (0–9 = 0–9, A–Z = 10–35, then the 7 symbols = 36–42).
  2. For "CODE39": C=12, O=24, D=13, E=14, 3=3, 9=9.
  3. Sum the values: 12 + 24 + 13 + 14 + 3 + 9 = 75.
  4. Divide by 43 and keep the remainder: 75 ÷ 43 = 1 remainder 32.
  5. Convert 32 back to a character using the same table: value 32 = W.

Result: the Mod 43 check character for "CODE39" is W.

You'll almost never need to do this by hand in production — any decent generator calculates and appends it automatically when you turn the option on. It's useful to understand mainly for troubleshooting: if a barcode fails LOGMARS validation, a wrong check digit is one of the first things to rule out.

5. Why Won't My Code 39 Barcode Scan? (5 Common Fixes)

Code 39 is forgiving compared to most symbologies, but these five issues cause the vast majority of real-world scan failures we hear about:

  1. Missing start/stop asterisks. If the encoded string doesn't include the leading and trailing "*", most software won't generate a valid Code 39 symbol at all — this is usually a data-entry problem, not a printing one.
  2. A trailing space in your source data. A stray space at the end of a spreadsheet cell is a valid Code 39 character, so it silently gets encoded — producing a barcode that's technically correct but doesn't match the value you expected.
  3. Printed too small. Code 39 needs a wide-to-narrow bar ratio of roughly 2:1 to 3:1 to stay reliably readable. Shrink the label too far and that ratio collapses, and adjacent bars start blurring together.
  4. Not enough quiet zone. Scanners need blank white margin on both sides of the barcode — as a rule of thumb, at least 10x the width of the narrowest bar — or they can't reliably find where the code starts and ends.
  5. Extended Code 39 on an unconfigured scanner. If you're using lowercase letters or extra symbols (Extended/Full ASCII Code 39), the scanner has to be explicitly set to decode it — otherwise it reads the raw character pairs instead of the intended text.

6. How to Generate Code 39 Barcodes in Bulk

If you're labeling more than a handful of items, typing each Code 39 value into a font-based generator one at a time doesn't scale. Here's the fast path:

1

Export Your List

Pull your asset tags, part numbers, or ID list into a single-column Excel or CSV file — no special formatting needed.

2

Open the Workspace and Select Code 39

Drop the file into our bulk barcode workspace — it opens pre-set to Code 39 — and every row becomes a label automatically.

3

Export a Print-Ready PDF Roll

Download a continuous, correctly-sized PDF roll for your Zebra, Rollo, or Dymo printer — quiet zones and bar ratios are handled for you, which solves most of the scanning issues in the section above before they happen.

Everything runs client-side in your browser — your part numbers and asset lists never touch our servers. If you'd rather see the full workflow first, the Excel-to-barcode guide walks through column setup and common formatting mistakes.

6. 仓库贴标常见问题解答

Does a Code 39 barcode need a check digit?
No. Code 39 is self-checking by design, so a check digit is optional. Some standards built on top of Code 39, such as LOGMARS for U.S. military logistics, require the Modulo 43 check digit anyway for an extra layer of accuracy.
What is the difference between Code 39 and Code 93?
Code 93 was designed as a more compact successor to Code 39. It encodes the same core character set in less physical space and includes two built-in check characters, but it is less universally supported by older scanners than Code 39.
Why won't my Code 39 barcode scan?
The most common causes are a missing start or stop asterisk, an accidental trailing space in the encoded data, printing the barcode too small for its wide-to-narrow bar ratio, or an insufficient quiet zone (blank margin) on either side of the barcode.
Can Code 39 encode lowercase letters?
Standard Code 39 cannot. Extended (Full ASCII) Code 39 can represent lowercase letters and additional symbols by combining pairs of standard characters, but the scanner must be specifically configured to decode Extended Code 39 or it will read the raw, un-decoded pairs instead.
Is Code 39 obsolete, or is it still used today?
Code 39 is very much still in active use, just not in retail. It remains standard in U.S. defense logistics (LOGMARS), automotive parts tracking (AIAG), aerospace maintenance, healthcare equipment tagging, and name badges or asset labels, largely because it is simple, self-checking, and readable by virtually any scanner ever made.
How much bigger is a Code 39 barcode than Code 128 for the same data?
Noticeably bigger. Code 39 needs roughly twice the physical width of Code 128 to encode the same string, because Code 128 packs more information per bar-and-space pattern. This is why Code 128 has become the default for small, dense labels while Code 39 is reserved for applications where scanner compatibility matters more than label size.

Need Code 39 Labels in Bulk?

Upload your list, get correctly-sized, print-ready Code 39 labels in seconds. Free to start, no software install.

Share This Article

Join the Logistics Newsletter

Get actionable tips on warehouse automation, hardware reviews, and supply chain scaling delivered twice a month. Absolutely no spam.

Sohail Ahmad

Sohail Ahmad

首席系统架构师与高级平面设计师

Operating out of Riyadh, Saudi Arabia, Sohail bridges the critical gap between digital software architecture and physical logistics. He specializes in full-scale e-commerce automation, IoT tracking systems, and engineering B2B generation workflows for international brands and regional 3PLs.

停止手动格式化电子表格。

立即创建免费账户以保存您的工作区配置,并解锁无限量的批量 PDF 导出功能。

需要帮助?与 Burt 聊天 👋