Practical guide

Code 128 vs Code 39: How to Choose and Test

Compare Code 128 and Code 39 for inventory and legacy systems, then proof a replacement label without changing the data your scanner sends.

Start with the application, not the appearance

A barcode is the interface between a label and a system that needs to look up a record. If you are buying labels for a new inventory system, you can choose the format with the receiver and the available label space in mind. If you are replacing labels on an existing fleet, the safest choice may already be written into a scanner profile, a maintenance manual or a customer specification. Find that requirement before comparing bar patterns. The fact that your phone can read both symbols is useful for a quick check, but it tells you little about a warehouse scanner configured to read only one.

Take a real field such as an equipment number. A value like PUMP-0042 has a meaning outside the symbol: someone may type it manually, search for it in the maintenance app or export it in a report. The symbology is how the value is represented. Switching symbologies should not silently change the value, strip the zeros or add a character that the host was never designed to process.

How the two formats affect a label

Standard Code 39 supports uppercase letters, digits, space and a limited set of punctuation. In legacy environments that limited alphabet can be an advantage because the restrictions are already built into the surrounding workflow. A barcode may appear with asterisks in a font-based workflow; those denote start and stop rather than meaningful parts of your stock number. Some installations require an optional Mod 43 check character and may transmit it, verify and strip it, or simply reject labels without it. Ask for the profile or inspect a known-good label and the scanner output.

Code 128 uses different character sets and can encode pairs of digits compactly in Code Set C. A long numeric asset key can therefore fit in less width than its Code 39 equivalent at a similar narrow-element size. Mixed text and digits behave differently, so test your real values rather than extrapolating from a single numeric sample. Code 128 has a mandatory symbol check character generated by the encoder. It is not the same as a product’s GTIN check digit, and it should not appear as an extra character in the asset key.

Code 128 and GS1-128 are also different requirements. If a receiver asks for GS1 application identifiers, FNC1 and group separation are part of the data contract. Do not substitute plain Code 128 because it looks similar or because a visual label shows parentheses around some numbers.

Run a small migration experiment

First record the current scan output from at least three original labels. Choose a short ID, the longest ID in your data and an ID with a leading zero or punctuation. Scan each into a plain text field and into the actual application. Write down whether the reader adds a prefix, a suffix or an Enter keystroke. If the app strips characters before lookup, ask whether that transformation is part of the scanner profile or part of the app.

Next create the same sample values in the Code 128 generator and Code 39 generator. Use identifiers for a test environment or identifiers you are entitled to use. Compare the narrow bar widths and the physical dimensions of the previews. Print on the same material using the actual label template. Include at least one proof on the device you will use for the run; a different desktop printer does not reproduce the thermal printer’s dot pitch or ink spread.

Scan every proof with the production profile without disabling validation. If it fails to read, note whether the device can read a known-good label in that symbology. If the test does decode, compare the delivered value to the recorded baseline and open the intended record. Repeat with a different user or workstation if there is more than one receiving configuration. A partial rollout is safer than replacing every label after a bench test.

Choose print dimensions you can reproduce

The narrow element needs enough physical width to survive print and scan. At 203 dots per inch one dot spans about 0.125 mm; at 300 DPI it spans about 0.085 mm. These numbers help you discuss a feasible layout with your printer. They do not establish the correct size for every application. A scanner reading bins at arm’s length and a fixed reader across a conveyor can need different designs.

Preserve the ratio of bar widths and the clear margins at both ends. Place a vector export at its final size rather than dragging it horizontally until it fits. If your printer pipeline accepts only raster graphics, export a lossless image and avoid resizing it after rasterization. Fit-to-page is useful for documents but undermines a controlled proof: confirm the size on paper with a ruler. Keep a readable version of the identifier nearby so an operator can complete a lookup if a label is damaged.

Check actual placement, too. A scan on a flat sheet does not tell you what happens once a tag wraps around tubing, gets laminated or sits under a flashing inspection light. Compare the installation with the proof and change just one variable at a time if failures appear. The print quality guide walks through diagnosis in more detail.

Make a decision you can explain later

Keep Code 39 where the receiving system, customer or contract requires it and where the longest ID can fit without sacrificing readability. Prefer testing Code 128 for a new internal system if it accepts the symbology and benefits from more compact numbers or a broader input alphabet. Neither symbol allocates a retail GTIN or automatically makes a label suitable for checkout. If you need a product code for retail, ask the partner which symbol it accepts and use the identifier actually assigned to your item.

Document the selected symbology, scanner profile, physical proof and exact sample values in your label template notes. Include what to do if a new ID exceeds the approved space: use wider stock or review the input policy, rather than compressing a single barcode until it fits. Put the approved proof next to the template revision. When somebody asks why one department still prints Code 39, this record answers the question without relying on whoever installed the scanner.