QRBarcode logoQRBarcode
Back to blog

Code 128 vs Code 39 for Inventory Labels

Compare Code 128 and Code 39 barcode density, character sets, checks, scanner support and label width to choose the right inventory format.

Aug 5, 2026 Reviewed Aug 5, 2026QRBarcode Editorial Team portraitQRBarcode Editorial Team
Cut-paper comparison of compact and wide inventory barcode labels

Quick decision

For Code 128 vs Code 39, choose the symbology your scanners and software explicitly require. Code 128 supports the full printable ASCII set and is typically denser. Code 39 uses a smaller native character set, is visually wider for comparable data, and remains common in legacy industrial systems. Compatibility is more important than theoretical efficiency.

QRBarcode generates Code 128 but does not generate Code 39. It does not silently substitute one for the other.

Character set

Code 39 traditionally represents uppercase letters, digits, and a limited set of symbols. Extended conventions can represent more characters but require matching decoder behavior and produce much longer symbols. Code 128 uses code sets to cover printable ASCII efficiently and can compact numeric pairs.

If identifiers need lowercase letters or broad punctuation, Code 128 is generally the direct fit. If an established system mandates uppercase Code 39, changing every scanner and label may cost more than the saved space.

Density and label width

Code 128 usually encodes the same mixed or numeric value in less horizontal space. That advantage matters on asset tags, shelf labels, and packages. However, a dense renderer cannot rescue an excessively long identifier. Longer values still create more bars and require sufficient printer resolution.

Code 39's wider pattern can be forgiving in some legacy scanning setups when labels have plenty of room, but assumptions must be tested with the actual equipment and print process.

Check characters

Code 128 includes a mandatory internal checksum in its symbol construction. Code 39 check character use is optional in many workflows and must match scanner configuration. Application-level validation and uniqueness are separate from either symbol check.

Do not rely on a successful scan to prove the asset exists. Validate prefixes, lengths, allowed values, and record state in inventory software.

Which barcode is better for inventory?

For a new controlled system, Code 128 is often attractive because of its broad character set and density. Define a short stable ID, enable Code 128 on readers, decide prefix and suffix behavior, print human-readable text, and test end to end.

For an existing Code 39 environment, inventory every scanner, label template, host application, supplier, and integration before migration. Mixed formats can create silent failures if devices disable one or applications expect different character rules.

Print and scan testing

Both are linear barcodes and need side quiet zones, strong contrast, sharp edges, enough width, and correct aspect ratio. Avoid horizontal squeezing. Test on the final thermal or transfer printer and after attaching labels to curved or reflective assets.

Scan into the actual application field. Readers may append Enter, strip characters, or transmit symbology identifiers. Compare the received string byte for byte.

Migration path

Choose a controlled pilot area, produce dual-labeled records only when operations can distinguish them, update scanner profiles, test application parsing, train staff, and retain rollback. Do not reinterpret existing Code 39 identifiers merely to make them valid Code 128; the encoded business key should remain consistent unless a governed migration changes it.

Use the Code 128 barcode generator for supported output and the barcode scanner to inspect samples. For required Code 39 generation, use a tool and verification process that explicitly supports Code 39.

Code 39 vs Code 128 pilot matrix

Create representative identifiers and render both formats with tools that explicitly support them. Measure physical width at the same narrow-bar size, decode speed, first-pass rate, printer tolerance, and received text. Include lowercase and punctuation values beyond native Code 39 rules, plus numeric runs that Code 128 can compact.

Do not judge Code 39 vs Code 128 from a monitor alone. Print on the oldest field printer and scan with the oldest reader likely to remain. A new imager can hide incompatibility in a legacy fleet. Test damaged and curved labels without using damage to excuse inadequate baseline quality.

Application behavior

Capture scanner prefixes, suffixes, symbology identifiers, checksum settings, and keyboard layouts. Code 39 may transmit or suppress start/stop characters or require an optional check character. Code 128 readers may expose a symbology identifier. The host should normalize only documented transformations.

Which barcode is better for inventory depends on the route from identifier issuance to label, reader, driver, input field, validation, and record lookup. Code 128 often wins a new density and character-set comparison; Code 39 may remain correct for a mandated legacy interface.

Documentation for operators

Print human-readable text, establish a replacement process, and explain how to distinguish an unreadable label from a missing inventory record. Operators should not create a new asset merely because a scan fails. Retain failed labels and track repeat failures by printer or material.

Document the Code 128 vs Code 39 choice and the test evidence supporting it.

Related tools and guides

Sources