webby.tools

Code 39 Barcode Generator

Code 39 (also written as "Code 3 of 9") is one of the oldest and simplest 1D barcode formats still in wide use. It's "self-checking" by design — the internal structure of each character lets a scanner catch certain misreads even without any extra check digit — which is part of why it became a long-time favorite in industries like automotive manufacturing, healthcare, and defense and government logistics, where simplicity and reliability mattered more than raw data density. The tradeoff is a limited character set: Code 39 only supports uppercase letters, digits, and a handful of symbols. This tool encodes your content into a Code 39 barcode entirely in your browser — enter your content below, preview it live, and download it as a PNG or SVG. Need to encode lowercase letters or a wider range of characters instead? Try the Code 128 Barcode Generator. If you just need to check or calculate a Code 39 check digit without generating an image, use the Barcode Check Digit Calculator. And after generating a code, scan the result with the 2D Barcode Reader to confirm it decodes correctly.

Barcode Content

Supports A–Z, 0–9, and the symbols - . $ / + % and space. Lowercase letters are automatically capitalized.

Enter some content above to preview your barcode

How to Use

  1. Type or paste the text you want to encode into the Content box. Lowercase letters are automatically capitalized as you type.
  2. Check Add a check digit if the system reading the barcode expects one — otherwise leave it unchecked.
  3. If you added a check digit, optionally check Show the check digit in the printed text too to display it in the human-readable line beneath the barcode.
  4. Check Include human-readable text if you want the raw content printed underneath the barcode as well.
  5. Watch the preview update automatically as you type or change any option.
  6. Choose a Download Scale — larger scales produce a bigger image, useful for printing.
  7. Download as a PNG for most uses, or an SVG if you need to resize it for large printing without losing quality.
  8. Before printing in bulk, test-scan the result with the 2D Barcode Reader to confirm it decodes correctly.

What Is Code 39?

Code 39 gets its name from the fact that it originally encoded 39 characters — the set was later extended, but the name stuck. Introduced in the late 1970s, it was one of the first alphanumeric barcode formats, meaning it could represent letters and symbols rather than just digits like earlier numeric-only barcodes. That flexibility, combined with how easy it was to print and decode with the scanning equipment of the era, made it an early standard across a wide range of industries.

Code 39 is described as "self-checking" because of how each character is built: every character is represented by a fixed pattern of bars and spaces with a specific number of "wide" elements, and a scanner can verify that structure against what it expects for that character. If the pattern doesn't match, the scanner can flag a misread — giving a baseline of error detection even without the optional check digit described below.

Do I Need the Check Digit?

The optional Code 39 check digit adds an extra layer of error detection on top of the format's inherent self-checking structure, catching mistakes that character-level validation alone might miss. It's calculated automatically by this tool when you turn it on.

That said, many legacy systems that use Code 39 were built around barcodes without a check digit, and simply read the encoded characters as-is. If you turn on the check digit for a system that isn't expecting one, the scanner may treat the extra character as part of your actual data rather than validating and discarding it. Check with whoever operates the scanning system before enabling this option — when in doubt, leave it off.

Frequently Asked Questions

What is Code 39 used for?

Code 39 has long been used in inventory and asset tracking, the automotive industry, and defense and government logistics, thanks to its simplicity and reliability. It's still found in many legacy systems today, even as newer formats like Code 128 have taken over in some applications.

What characters can it encode?

Uppercase letters A–Z, digits 0–9, and the symbols - . $ / + % plus a space. Lowercase letters aren't supported by the format and are capitalized automatically as you type.

Should I turn on the check digit?

Only if the system reading the barcode expects one — see the "Do I Need the Check Digit?" section above. Many Code 39 setups don't use one at all.

Is there a data limit?

There's no hard limit, but Code 39 is one of the least space-efficient barcode formats — each character takes up more room than in denser formats like Code 128. Long content produces a very wide barcode, so it's best to keep content short.

Is my data uploaded anywhere?

No. Everything is generated locally in your browser — your content is never uploaded or sent to a server.

This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.