Gerador de QR Code e Código de Barras
🏭
Linear (1D)

Code 39 (Code 3 of 9)

A simple, self-checking barcode supporting letters and numbers, widely used in automotive, defense, and healthcare industries.

Introduced
1974
Developer
Intermec (David Allais and Ray Stevens)
Data Capacity
Variable length, typically up to 43 characters
Character Set
43 characters: A-Z, 0-9, -, ., $, /, +, %, and space

What is CODE39?

Code 39, also known as "Code 3 of 9," is one of the oldest and most widely used alphanumeric barcodes. Its name comes from the fact that each character is encoded using 9 elements (5 bars and 4 spaces), of which 3 are always wide. Code 39 was the first barcode to encode letters as well as numbers, making it revolutionary when introduced. Its simplicity and self-checking nature have made it a staple in non-retail applications for nearly 50 years.

History of CODE39

Code 39 was developed in 1974 by David Allais and Ray Stevens at Intermec. It was groundbreaking as the first alphanumeric barcode symbology. The U.S. Department of Defense adopted it in 1982 as the standard barcode for military applications (MIL-STD-1189). The automotive industry followed with AIAG standards. The healthcare industry adopted it for patient identification. Code 39 became so ubiquitous in non-retail applications that it's sometimes called the "workhorse" barcode. While newer formats like Code 128 offer higher density, Code 39's simplicity ensures its continued use today.

How CODE39 Works

Each character in Code 39 is encoded using 9 elements - 5 bars and 4 spaces. Of these 9 elements, exactly 3 are wide (hence "3 of 9"). The ratio between wide and narrow elements is typically 2.5:1 or 3:1. • Every Code 39 barcode starts and ends with the asterisk (*) character, which serves as the start/stop delimiter • Characters are separated by a narrow inter-character gap • The barcode is self-checking, meaning single printing errors are usually detected without a check digit • An optional modulo 43 check digit can be added for additional security Code 39 Extended uses pairs of standard characters to encode the full ASCII set, though this doubles the barcode length.

Technical Specifications

Symbology TypeLinear (1D)
Character Set43 characters (A-Z, 0-9, 7 special characters)
Data CapacityVariable, practical limit ~20-30 characters
Check DigitOptional (Modulo 43)
Wide/Narrow Ratio2.5:1 to 3:1
Minimum X-Dimension0.19mm (7.5 mil)
Quiet Zone10x narrow element width
Self-CheckingYes

Common Use Cases

Defense & Military

MIL-STD-1189 requires Code 39 for marking military equipment, parts, and supplies.

Automotive Industry

AIAG standards specify Code 39 for parts tracking, shipping labels, and VIN encoding.

Healthcare

Patient wristbands, specimen labels, and medical device tracking often use Code 39.

Government IDs

Many government employee badges and access cards use Code 39 barcodes.

Libraries

Library card and book barcodes often use Code 39 due to its simplicity.

Industries Using CODE39

Defense & MilitaryAutomotiveHealthcareGovernmentLibrariesManufacturingEducation

Advantages & Disadvantages

Advantages

  • Simple to implement - no licensing required
  • Self-checking - naturally detects most errors
  • Alphanumeric - encodes both letters and numbers
  • Widely supported - virtually every scanner reads it
  • No check digit required (optional)
  • Can be printed with almost any technology
  • Very forgiving of print quality variations

Disadvantages

  • Low data density - barcodes are longer than Code 128
  • Limited character set - uppercase only, few special characters
  • Full ASCII requires Extended Code 39 (doubles length)
  • Not suitable for retail point-of-sale
  • Wide/narrow ratio makes it sensitive to printing variations

When to Use CODE39

Best For

  • Military and defense applications (MIL-STD-1189)
  • Automotive industry (AIAG compliance)
  • Healthcare patient identification
  • Simple alphanumeric encoding needs
  • Situations where simplicity matters more than density
  • Legacy systems that don't support Code 128

Not Recommended For

  • Retail point-of-sale (use EAN/UPC)
  • Space-constrained labels (use Code 128)
  • Lowercase or special character needs
  • High-volume, high-density applications

Frequently Asked Questions

Why is it called "Code 3 of 9"?

Each character is encoded with 9 elements (5 bars and 4 spaces), and exactly 3 of these elements are always wide. The "3 of 9" pattern is what gives the barcode its error-detection capability.

Can Code 39 encode lowercase letters?

Standard Code 39 only supports uppercase letters. Extended Code 39 (or Code 39 Full ASCII) can encode lowercase and all ASCII characters, but it does so by using pairs of characters, effectively doubling the barcode length.

Do I need a check digit with Code 39?

No, Code 39 is self-checking and a check digit is optional. However, for high-security applications like healthcare or defense, adding the modulo 43 check digit is recommended.

What's the asterisk (*) in Code 39?

The asterisk is the mandatory start and stop character. Every Code 39 barcode must begin and end with *. When you encode data, you don't include the asterisks - the barcode generator adds them automatically.

Related Barcode Formats

Code 128Code 93Codabar

Ready to Create Your CODE39 Barcode?

Generate professional-quality CODE39 barcodes for free. No signup required.

Generate CODE39 Barcode Free
CODE39 Barcode: Complete Guide, Specs & Generator