Side by side
Same nine characters and the same narrow-bar width. The Code 39 version is noticeably wider because each character takes more space.
| Code 128 | Code 39 | |
|---|---|---|
| Characters | All 128 ASCII characters, including lowercase | 43: 0 to 9, A to Z, space, - . $ / + % |
| Width for the same data | Compact; digit pairs are encoded in one symbol character | Often wider; the difference depends on the data and settings |
| Check character | Built in (modulo 103), added automatically | Optional (modulo 43) |
| Print tolerance | Good | Can be easier to print at the same narrow-bar width; test scan quality |
| Typical uses | Warehousing, shipping labels, GS1-128, marketplace labels, asset tags | Automotive, defense, healthcare wristbands, legacy industrial systems |
| Retail checkout | No (use EAN-13 or UPC-A) | No |
Why Code 128 is usually the better default
It encodes all of ASCII. Lowercase letters, punctuation, and control characters are supported through Code 128's code sets, so product codes such as ab-12/x can be encoded without changing the data.
It is compact. Code 128 has three code sets. The generator switches between them automatically, and set C encodes two digits per symbol character. A long numeric value such as a serial number or tracking number comes out much narrower than in Code 39.
It checks itself. A modulo-103 check character is always included, so a scanner rejects most misreads rather than passing on wrong data.
It is the base of GS1-128. GS1-128 uses Code 128 with an FNC1 character after the start character and structured data marked by Application Identifiers. If you might later need GS1-128, check that your scanners and software can process GS1-128 data. Barcode Pro produces plain Code 128; it does not add GS1-128 Application Identifiers.
When Code 39 is the right choice
- A standard requires it. Some automotive (AIAG) and defense (MIL-STD-129) labeling rules specify Code 39 for certain fields.
- Your existing scanners or software expect it. Changing formats on a working system rarely pays for itself.
- Print quality is poor. Code 39 uses two bar widths and can be easier to print with older equipment, but test the printed labels with your scanner.
- Your data is short and uppercase. For a value like
BIN-A12, the width difference is small and either works.
Practical tips for both
- Bar width. A narrowest bar of 0.25 mm or more is a practical starting point for ordinary handheld scanners; test with your own printer and scanner. On a 203 dpi thermal printer, that is about 2 dots; see the size guide.
- Quiet zone. Leave at least 10 times the narrowest bar blank on both sides. The studio does this for you.
- Height. Around 15% of the barcode length, and at least about 6.4 mm, is a common guideline for general labels. Follow your industry or customer specification if it sets one.
- Keep data short. More data usually increases the barcode width. Use a short internal ID and look up the details in your system instead of encoding a full description.
- Uppercase for Code 39. If your IDs include lowercase letters, either switch to Code 128 or change the IDs.
- Test with your scanner. Some scanners ship with Code 39 check-character verification switched on or off; make sure the setting matches what you print.
And when to use neither
- Selling in stores: use an EAN-13 or UPC-A with a GS1 number.
- Cartons shipped to retailers: follow the retailer's labeling requirements, which may call for ITF-14 or GS1-128.
- Linking to a website, or packing lots of data into a small space: use a QR code. See QR codes with a logo.
Frequently asked questions
Is Code 128 better than Code 39?
For most new projects, yes. Code 128 encodes all 128 ASCII characters, including lowercase letters, and usually produces a shorter barcode for the same data. Choose Code 39 when a customer, industry standard or existing scanner setup requires it.
Can Code 39 encode lowercase letters?
Standard Code 39 cannot. It supports digits, uppercase letters, space and the symbols - . $ / + %. Extended Code 39 can represent full ASCII using character pairs for some values, but your generator must encode them and your scanner must be configured to decode them.
Can I use Code 128 for products sold in stores?
Not as a replacement for EAN-13 or UPC-A at the checkout. Most retail checkout systems use a GTIN encoded in an EAN or UPC symbol. Code 128 is used in logistics through its GS1-128 variant, and for in-store labels that only your own system reads.
Why does my Code 39 barcode show asterisks?
Code 39 uses an asterisk as the start and stop character. Some generators show them in the human-readable text; others hide them. They are part of the symbol either way; check whether your generator adds them automatically before entering asterisks.