Barcode Studio

Code 39 Barcode Generator

Create Code 39 barcodes for industrial identification, manufacturing, inventory and asset tracking.

Data Matrix PDF417 Code 128 Code 93 EAN-13 EAN-8 UPC-A ISBN Code 39 ITF-14 MSI Plessey Pharmacode Codabar

Barcode & Matrix Generator

Live Studio Preview
Invalid input format for selected symbology.
SMART BARCODE INTELLIGENCE
Analyzing barcode...
-- /100 SCAN READY
RECOMMENDED FORMAT Analyzing...
BEST FOR —
DATA RULES —
CHECK DIGIT —
CONTRAST —
Analyzing barcode data...
PROFESSIONAL EXPORT STUDIO
Export your barcode Choose a professional format and output resolution.
HIGH RES
PNG · 1024 px · Current background

Code 128 Batch Serial Number Generator

Generate sequential Code 128 barcodes for warehouse SKUs, asset tags, inventory labels, and other internal identifiers.

Configure your sequence above and click generate to build batch items.
BARCODE KNOWLEDGE STUDIO

Code 39 Barcode Generator

Quick answer: Code 39 is a self-checking, variable-length linear barcode defined in ISO/IEC 16388:2023. It also goes by the names Code 3 of 9 and Alpha39. The symbology encodes 43 characters: uppercase A–Z, digits 0–9, and the seven special characters space, hyphen, period, dollar sign, slash, plus sign and percent sign. A check digit is optional.

Runs in your browser Standards-aware formats Batch serial mode SVG, PNG, WEBP, JPG

What a Code 39 barcode is

Code 39 is a one-dimensional, discrete, self-checking barcode symbology defined in ISO/IEC 16388:2023 (third edition). It is also known as Code 3 of 9 and Alpha39. The name "3 of 9" refers to its structure: each character is represented by 9 elements — 5 bars and 4 spaces — of which exactly 3 are wide.

The asterisk character (*) serves as both the start delimiter and the stop delimiter. The asterisk is not transmitted as data — decoders strip it — but it must be present in any valid Code 39 symbol. This design means the asterisk itself cannot be used as a data character.

Code 39 is self-checking. The "3 of 9" element structure means that a single printing defect that widens or narrows one element enough to change its narrow-to-wide classification would produce a character with the wrong number of wide elements, which the decoder detects as invalid. This self-checking property was the practical reason Code 39 survived for decades without a mandatory check digit in many deployments.

Code 39 technical specification

Character set and structure

ParameterValueSource
Full nameCode 39 (also Code 3 of 9, Alpha39)ISO/IEC 16388:2023
ISO/IEC standardISO/IEC 16388:2023 (third edition)iso.org/standard/77799.html
Code typeDiscrete (intercharacter gaps between characters)ISO/IEC 16388:2023 §4.1(b)
Native character set43 characters: A–Z (26), 0–9 (10), space, -, ., $, /, +, % (7)ISO/IEC 16388:2023 §4.1(a)
Extended ASCII (Full ASCII Code 39)All 128 ASCII characters via two-character shift sequences using $, /, +, %ISO/IEC 16388:2023 §4.1(a)
Symbol lengthVariableISO/IEC 16388:2023 §4.1(e)
Elements per character9 (5 bars + 4 spaces): exactly 3 wide, 6 narrowISO/IEC 16388:2023 §4.1(c)
Start/stop characterAsterisk (*) — not transmitted by decoderISO/IEC 16388:2023 §4.3.3
Self-checkingYesISO/IEC 16388:2023 §4.1(d)
Wide-to-narrow ratio2.0:1 to 3.0:1 (nominal); 1.8:1 to 3.4:1 toleranceISO/IEC 16388:1999 §4.4(b); ISO/IEC 16388:2023

Check character

ParameterValueSource
Check characterOptional — modulo-43ISO/IEC 16388:2023 Annex A
AlgorithmSum of all data character values (A=10, B=11, ... Z=35, 0=0, ... 9=9, special chars each assigned unique values 0–42); divide sum by 43; remainder maps to Code 39 characterISO/IEC 16388:2023 Annex A
TransmittedYes — the check character is included in the symbol and may be transmittedISO/IEC 16388:2023

Print requirements

ParameterValueSource
Quiet zonesMinimum 10X on each sideISO/IEC 16388:1999 §4.4(d)
Min bar height (manual scan)5.0 mm or 15% of symbol width excluding quiet zones, whichever is greaterISO/IEC 16388:1999 §4.4(e)

When to use a Code 39 barcode

US Department of Defense LOGMARS. The DoD's Logistics Applications of Automated Marking and Reading Symbols standard (LOGMARS), based on MIL-STD-1189B, specifies Code 39 for marking parts, components and assemblies in the US defence supply chain. If you are a defence contractor required to apply LOGMARS-compliant labels, Code 39 is mandated. Use Code 39 in this context exactly.

Automotive parts and VIN-related labelling. Major automotive manufacturers and their tier-1 suppliers have used Code 39 for parts identification labels for decades. AIAG standards and automotive manufacturing specifications in some contexts still reference Code 39 for internal part tracking even as Code 128 has become available.

Healthcare asset and equipment tracking (legacy systems). Some hospital asset tracking and medical equipment systems installed before Code 128 became dominant use Code 39 scanners. If the installed system cannot be reconfigured, Code 39 labels remain the only compatible option.

Government and industrial applications requiring simplicity. Code 39 is self-checking without a mandatory check digit, its wide-to-narrow ratio makes it tolerant of imperfect dot-matrix and impact printing, and virtually every barcode reader ever sold can decode it. These properties made it the dominant industrial barcode for two decades and continue to make it a valid choice in controlled environments where that installed base still operates.

When NOT to use Code 39 for new deployments. Code 39 is not the modern choice. Its 43-character set does not include lowercase letters. Its discrete structure — each character separated by an intercharacter gap — makes it physically longer than Code 128 for equivalent data. A 10-digit numeric string encoded in Code 128 Code Set C is roughly half the physical length of the same string in Code 39. Use Code 128 for any new warehouse, shipping or general-purpose label system.

Print requirements for Code 39

X-dimension. Use the largest X-dimension your label space allows. Code 39's discrete intercharacter gap adds physical length on top of the character modules, so the symbol is already longer than a continuous barcode for equivalent data. A larger X-dimension improves scan reliability, especially on thermal and impact-printed substrates.

Wide-to-narrow ratio. ISO/IEC 16388:2023 specifies a nominal ratio of 2.0:1 to 3.0:1, with tolerance from 1.8:1 to 3.4:1. The ratio must be consistent throughout the symbol. A ratio below 1.8:1 makes wide and narrow elements ambiguous. A ratio above 3.4:1 produces needlessly long symbols.

Quiet zones. The symbol must have a clear zone of at least 10X on both the left and right ends. The quiet zone is part of the standard, not advisory. Any element — border, adjacent barcode, text — within the quiet zone will cause the start or stop character to be misidentified.

Bar height. The minimum bar height is 5.0 mm or 15 percent of the symbol width excluding quiet zones, whichever is greater, per ISO/IEC 16388:1999 §4.4(e). Taller bars improve tolerance for scanner tilt and label curl.

Substrate. Code 39's wide-to-narrow ratio tolerance makes it more forgiving on rough substrates like corrugated board and rough textiles than narrower-ratio codes. This was historically one reason for its adoption in industrial environments. Even so, high-contrast print on a smooth substrate produces the most reliable results.

Troubleshooting: why your Code 39 barcode is not scanning

Lowercase letter in the data. Code 39's native character set is uppercase only. Lowercase letters require Full ASCII Code 39 shift encoding. If the generator accepts the input but the reader fails, check whether the reader is configured for Full ASCII Code 39 — standard Code 39 decoders will reject the shift sequences as invalid.

Asterisk in the data. The asterisk is the start and stop delimiter for Code 39 and cannot be used as a data character. Any input containing an asterisk will produce an invalid symbol.

Wide-to-narrow ratio distorted by scaling. If the exported PNG image is printed at a resolution that changes the module pixel count, the wide-to-narrow ratio may fall outside the 1.8:1 to 3.4:1 tolerance. Print at the exact pixel dimensions intended, or use the SVG export and scale uniformly at the print stage.

Quiet zone violated. Text, borders or adjacent labels placed within 10X of the symbol ends cause start/stop detection failure. Allow the full 10X quiet zone on both sides.

Check digit mismatch. If the system configuration requires a modulo-43 check digit and the label was printed without one, the scanner will reject valid-looking symbols. Conversely, if a check digit is included and the scanner is set to not verify it, the check character will appear in the decoded output as an extra character. Align the check digit setting between the generator and the scanner.

Bar height too short. A bar height below 5 mm or below 15 percent of symbol width causes scan failures when the laser beam dips below or above the bars during manual scanning. Reprint with taller bars.

Code 39 versus Code 128

Code 39 and Code 128 are both linear alphanumeric barcodes. Code 39 preceded Code 128 and is more limited on every technical measure. The comparison is relevant because many users searching for Code 39 are maintaining legacy systems and should understand the alternative for future work.

Code 39Code 128
StandardISO/IEC 16388:2023ISO/IEC 15417:2007
Character set43 characters (uppercase only natively)All 128 ASCII (uppercase, lowercase, digits, control chars)
LowercaseVia Full ASCII shift sequences onlyNatively in Code Set B
Check characterOptional modulo-43Mandatory modulo-103 (auto-calculated)
Symbol typeDiscrete (intercharacter gaps)Continuous
Physical lengthLonger for equivalent dataShorter — Code Set C halves numeric length
Self-checkingYesYes (via check character)
Active mandatesUS DoD LOGMARS, some automotiveWarehouse, shipping, GS1-128
Recommendation for new systemsNo — use Code 128Yes

Code 39 is not obsolete — it is actively required by LOGMARS and some automotive specifications. But if you are building a new labelling system and no regulation requires Code 39, Code 128 is the correct choice.

Using this barcode in Bahrain and international supply chains

Bahrain retailers, importers, manufacturers and logistics teams should match identifiers to the rules of their trading partners. Retail GTINs must come from the proper issuing organisation; a generator creates artwork but does not assign ownership. Internal stock and asset references may use organisation-defined values when the receiving system supports them.

Use British English in operational guidance where it matches your organisation’s style, and add Arabic instructions for teams that need them. Print under the actual conditions of use. Bahrain’s heat, bright light, dust, curved packaging and reflective laminate can expose contrast or surface problems that are invisible on a monitor.

Keep quiet zones clear, avoid stretching the image, and prefer dark bars on a plain light background. Scan samples from the beginning, middle and end of a print run. For regulated retail, healthcare, publishing or logistics use, confirm the current GS1, ISBN-agency, customer or industry specification before approving production.

PRODUCTION CHECKLIST

Before you print

  • Correct symbology selected
  • Identifier ownership confirmed
  • Check digit verified
  • Quiet zones kept clear
  • Strong bar contrast
  • Aspect ratio unchanged
  • SVG or high-resolution PNG
  • Production scanner test
Return to generator ↑
BARCODE FAQ

Frequently asked questions

Open a question to read a concise technical answer.

01What is a Code 39 barcode?+

Code 39 is a self-checking, variable-length linear barcode defined in ISO/IEC 16388:2023. It is also called Code 3 of 9 and Alpha39. Each character consists of 9 elements — 5 bars and 4 spaces — of which exactly 3 are wide. The native character set covers 43 characters: uppercase A–Z, digits 0–9, and seven special characters. The asterisk serves as the mandatory start and stop delimiter.

02What characters can Code 39 encode?+

Code 39's native 43-character set covers uppercase A–Z (26 letters), digits 0–9 (10), and seven special characters: space, hyphen, period, dollar sign, slash, plus sign and percent sign. Full ASCII Code 39 extends coverage to all 128 ASCII characters using two-character shift sequences, but requires scanners configured to support Full ASCII mode.

03Is Code 39 still used?+

Yes. The US Department of Defense LOGMARS standard (based on MIL-STD-1189B) mandates Code 39 for defence supply chain parts marking. Automotive manufacturers and their suppliers use Code 39 in parts tracking contexts. Many legacy warehouse and healthcare asset systems also continue to use it. However, for any new deployment without a specific mandate, Code 128 is the preferred symbology.

04What is the difference between Code 39 and Code 128?+

Code 128 (ISO/IEC 15417:2007) encodes all 128 ASCII characters including lowercase letters and produces shorter symbols for equivalent data. Code 128 Code Set C encodes digit pairs in one codeword, roughly halving the physical length of numeric strings. Code 39 (ISO/IEC 16388:2023) encodes only 43 characters natively, does not support lowercase, and is longer for equivalent data. Use Code 39 only when a regulation or legacy system requires it.

05Does Code 39 have a check digit?+

The Code 39 check digit is optional. ISO/IEC 16388:2023 Annex A defines a modulo-43 algorithm: assign each character a value from 0 to 42, sum all values, divide by 43, and the remainder maps to the check character. Some applications include the check digit; others rely solely on Code 39's self-checking structure. Align the check digit setting between the label generator and the scanner configuration.

06What is the LOGMARS barcode?+

LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is the US Department of Defense standard for barcode labelling in the defence supply chain, based on MIL-STD-1189B. LOGMARS specifies Code 39 as the required barcode symbology for parts, components and assemblies. Defence contractors delivering to the DoD must apply LOGMARS-compliant Code 39 labels to specified items.

07Can Code 39 encode lowercase letters?+

Not natively. The standard 43-character set includes only uppercase letters. Full ASCII Code 39 uses two-character shift sequences to represent all 128 ASCII characters, including lowercase, but this requires scanners explicitly configured for Full ASCII mode. Standard Code 39 decoders will not correctly interpret Full ASCII shift sequences.

08What is the wide-to-narrow ratio in Code 39?+

ISO/IEC 16388:2023 specifies a nominal wide-to-narrow ratio of 2.0:1 to 3.0:1. The tolerance band is 1.8:1 to 3.4:1. A ratio below 1.8:1 makes wide and narrow elements difficult to distinguish. Non-uniform scaling of the barcode image can change the ratio and push it outside tolerance, causing scan failures.

09What is Full ASCII Code 39?+

Full ASCII Code 39 is an extension of Code 39 that encodes all 128 ASCII characters by using two-character sequences. The four shift characters — $, /, %, + — combine with another Code 39 character to represent the 85 ASCII characters not in the native 43-character set. Full ASCII Code 39 is defined in ISO/IEC 16388:2023. Scanners must be explicitly configured to decode Full ASCII sequences; standard Code 39 mode will misread them.

10Do I need a GS1 licence to use Code 39?+

No. Code 39 encodes arbitrary alphanumeric data without any licensing requirement. It is fully usable for internal labelling — parts marking, asset tags, inventory labels — without registration or approval. A GS1 licence is only required when the encoded data includes a GS1-licensed GTIN for retail sale or GS1 supply chain use.