Skip to the tool
UPC Generator

Code 39 generator

Code 39 holds 43 characters and spends 16 modules on each one at a 3 to 1 ratio. The start and stop asterisks are added for you, and the readout shows what your scanner will send.

In the bars: *ASSET-0472*. Your scanner sends: ASSET-0472. Code 128 would be 30% narrower.

2.741 in (69.63 mm) wide by 0.734 in (18.64 mm) tall, clear space included

Code 39 barcode ASSET-0472

Code 39 is for your own labels, such as assets, bins and parts. It is not a product number for a store checkout, so products for sale need a UPC or EAN with a number licensed through GS1. The route to a licensed number is in how to get a UPC code.

  • Narrow bar: 0.33 mm (13 mil)
  • Clear space: 0.13 in (3.3 mm) left, 0.13 in (3.3 mm) right at minimum
  • PNG at 300 dpi: 844 by 221 dots, narrow bar 4 dots, so it prints at 0.339 mm
More options
Show sizes in

Your text, character by character

Each character is nine elements, three of them wide. The asterisks at both ends are the start and stop characters. Pick one to see its pattern.

Character A. Pattern WNNNNWNNW. Runs from module 16 to 31.

By the UPC Generator team. All 43 characters and the Full ASCII pairs match a second encoder bar for bar, and sample files are read back by decoding software. Last updated 4 November 2026. How UPC Generator pages are made.

The mod 43 check, worked through

Every character has a value: digits 0 to 9 are themselves, and A to Z are 10 to 35. Then come hyphen 36, period 37, space 38, dollar 39, slash 40, plus 41 and percent 42. Add the values and divide by 43, and the remainder names the check character.

For CODE39, that is C 12 + O 24 + D 13 + E 14 + 3 + 9, which comes to 75. Divided by 43, the remainder is 32, and value 32 is the letter W. The symbol reads CODE39W, and the scanner sends the W along unless it is set to strip it. You can run this for any text with the check digit calculator.

How Code 39 draws a character

Each character is five bars and four spaces, and exactly three of those nine are wide. Characters sit apart, with a narrow gap between them that carries no data. So at a 3 to 1 ratio, each character takes 15 modules plus 1 for the gap.

That gap costs width but also makes Code 39 forgiving, because a scanner reads each character on its own. It also means the barcode gets long fast:

The same text in Code 39 at two ratios and in Code 128
Text Code 39 at 3:1 Code 39 at 2:1 Code 128
ABC-1234 159 modules 129 modules 112 modules
ASSET-0472 191 modules 155 modules 134 modules
123456789012 223 modules 181 modules 101 modules

A 2 to 1 ratio saves about a fifth of the width. The cost is a smaller gap between wide and narrow. So choose 3 to 1 unless space forces your hand, and avoid 2 to 1 at small sizes.

Full ASCII mode and the trouble with $ / + %

Full ASCII carries all 128 characters by writing the extras as two symbols. Lowercase a is +A, an exclamation mark is /A, and Tab is $I. The bars are ordinary Code 39, so a scanner with the mode off prints the pair literally.

The same trick causes the opposite problem. A scanner with Full ASCII on will read a plain A/B as something other than A/B, because /B is a pair. The tool warns you when your text has one of those four symbols before a letter. Check what your scanner is set to, or avoid those symbols.

Why some systems still ask for Code 39

It dates from 1974 and needs no check calculation. It was standardized as ANSI MH 10.8 M-1983 and as the US defense standard MIL-STD-1189, since replaced by ANSI/AIM BC1/1995. Older equipment and contracts may still name it, and if yours does, this is the format to give them.

If nothing asks for it, the Code 128 generator makes shorter barcodes from the same text. For a list of stock codes, the SKU generator builds them and draws each one. Not sure which fits? The barcode generator tests your text against every format.

Sizes

A 0.33 mm narrow bar is a sensible default, and ASSET-0472 at 3 to 1 comes out 69.63 mm wide with its clear space. Go down to 0.25 mm if your label is small and your printer is at least 300 dpi. Leave the full 10 modules of clear space at each end, since a scanner needs it to find where the code begins.

Code 39 fonts and Word

Code 39 is the one common format a plain font can draw, as long as the text is wrapped in asterisks. That is why most free barcode fonts are Code 39. Making a barcode in Word covers Word's own barcode field. What a scanner does with those wide and narrow bars is in how barcodes work. ISO sells the Code 39 standard as a paid document, so the open reference listed at the end is the Wikipedia entry.

Code 39 questions

Which characters can Code 39 hold?

Capitals A to Z, digits 0 to 9, and seven symbols: hyphen, period, space, dollar, slash, plus and percent. That makes 43. The asterisk is also in the set, and it is kept for marking the start and the end.

Should I add the asterisks myself?

No. The generator adds them to the bars for you, and typing one gives an error. Some older barcode fonts need you to type them, which is where that advice comes from. Printing them in the text under the bars is optional.

Why can't I type lowercase?

Standard Code 39 has no lowercase. Changing it to capitals behind your back would make asset-a and ASSET-A the same barcode, so the tool stops and offers the change. Full ASCII mode can carry lowercase if your scanner has that mode turned on.

Does Code 39 need a check digit?

Not by the standard. Each character checks itself through its pattern, which is why many systems leave it off. Turn it on if your system expects one. Your scanner must be set to check it too, or the extra character arrives as part of your data.

Should I use Code 39 or Code 128?

Use Code 128 unless a system or customer asks for Code 39. The same text comes out shorter in Code 128, it holds lowercase directly, and it always has a check character.

2 source documents

  1. Libre Barcode: Code 39 font manual, character set and start and stop asterisks, fetched 2 November 2026
  2. Wikipedia: Code 39, character set, check digit and Full ASCII table, fetched 2 November 2026