Your input stays in this browser.
Identifier structure
Code 39 is a linear industrial symbology built from nine alternating bars and spaces per character, with three wide elements—hence the historical name '3 of 9'. It accepts uppercase letters, digits, space and a small punctuation set. The asterisk is a start/stop sentinel, so it cannot be used as ordinary data in this basic form.
Worked numerical example
The optional check character uses a value table: digits are 0–9, A is 10 through Z at 35, then punctuation continues to 42. Add the values of the data characters and take the remainder modulo 43. For PART-42/A, P=25, A=10, R=27, T=29, -=36, 4=4, 2=2, /=40 and A=10: total 183, remainder 11, which is B. The printed payload becomes PART-42/AB before the stop asterisk.
How the symbol encodes data
Every character pattern is separated by a narrow inter-character gap. That regularity makes Code 39 easy to print and inspect, but it is wider than modern Code 128 for the same information. A reader recognizes the start asterisk, individual patterns, optional check character and final asterisk before returning the data according to the receiving system's configuration.
Physical failure mode
Keep all bars vertical, preserve the leading and trailing quiet zones and avoid aggressive horizontal shrinking. Labels fail when narrow spaces fill with ink, a damaged edge removes a wide bar, or a dark background makes the quiet zone disappear. The optional checksum catches a substitution, but no checksum rescues an unreadable print.
Operational boundary
Code 39 is deliberately limited to a controlled character set; Code 128 is the choice for lowercase text and denser serial strings. EAN, UPC and EAN-8 encode fixed retail identifiers and use modulo-10 digits, while Code 39 carries an operational text field and may use modulo 43.
A format-specific proof
A correct modulo-43 result for PART-42/A is B, yielding PART-42/AB before the sentinel. The added B is data when the optional check setting is in use, whereas the surrounding asterisks are framing patterns and are commonly not transmitted. Record which convention the receiving application expects. A label printed without the optional B can scan perfectly yet fail a legacy validation rule that was configured to require it.
Worked check-digit example
The optional check character uses a value table: digits are 0–9, A is 10 through Z at 35, then punctuation continues to 42. Add the values of the data characters and take the remainder modulo 43. For PART-42/A, P=25, A=10, R=27, T=29, -=36, 4=4, 2=2, /=40 and A=10: total 183, remainder 11, which is B. The printed payload becomes PART-42/AB before the stop asterisk.
How the bars carry data
Every character pattern is separated by a narrow inter-character gap. That regularity makes Code 39 easy to print and inspect, but it is wider than modern Code 128 for the same information. A reader recognizes the start asterisk, individual patterns, optional check character and final asterisk before returning the data according to the receiving system's configuration.
Printing and scanning limits
Keep all bars vertical, preserve the leading and trailing quiet zones and avoid aggressive horizontal shrinking. Labels fail when narrow spaces fill with ink, a damaged edge removes a wide bar, or a dark background makes the quiet zone disappear. The optional checksum catches a substitution, but no checksum rescues an unreadable print.
When to use this format
Code 39 is deliberately limited to a controlled character set; Code 128 is the choice for lowercase text and denser serial strings. EAN, UPC and EAN-8 encode fixed retail identifiers and use modulo-10 digits, while Code 39 carries an operational text field and may use modulo 43.
A maintenance-bin case: PART-42/A
A plant has 480 replacement filters and labels each bin with PART-42/A. In basic Code 39 the permitted characters are P, A, R, T, hyphen, digits and slash; lowercase `part-42/a` must be normalised or rejected before printing. With the optional modulo-43 setting, the character values sum to 183 and the remainder is 11, B, so the encoded data is PART-42/AB. The framing asterisks are symbol sentinels, not characters that the stock system should store. Put `PART-42/A` in the master record and record separately that the reader is configured to verify and suppress the check B. That distinction prevents an operator from receiving the same filter once under the source key and once under a transmitted key that includes B. AIM's Code 39 specification describes the symbology's restricted character repertoire and optional check character: https://www.aiminc.org/standards/code-39/ .
Choose Code 39 for the legacy reader, not by habit
A 70 mm equipment tag may accommodate PART-42/A easily, whereas a 24-character asset string will become conspicuously wide because Code 39 adds a pattern and an inter-character gap for every character. Do not solve that by shrinking the horizontal scale: the narrow elements become the first casualty of thermal-transfer spread. If the reader fleet accepts Code 128 and the identifier contains lowercase, a longer serial or a dense numeric run, move the contract to Code 128 deliberately and test the host field. Keep Code 39 when its visible uppercase alphabet, installed readers and existing validation rule are requirements. The acceptance test is specific: scan three final labels, one ordinary value, one with slash, and one deliberately wrong check character; the host must accept the first two as their source values and reject the third. A camera application that displays an asterisk or omits B answers a different question from the maintenance system.
Record the reader's check-character policy
Before releasing the maintenance labels, make the scanner configuration part of the work instruction: state whether the modulo-43 character is required, transmitted, removed or checked by the host. Scan the same PART-42/A proof into a blank test field and retain the exact returned text. That one observation settles disputes about asterisks, B, prefixes and suffixes that artwork inspection cannot settle. When a replacement reader is installed, repeat this test before replacing the printer template.
A width check before choosing the stock
Measure the finished run with the actual data length, including the optional check character. A label that fits `PART-42/A` may not fit a later 18-character replacement key at the same X-dimension. Set a maximum approved Code 39 character count for each label size, and send longer values to the agreed Code 128 route rather than allowing an operator to compress the bars by eye. Keep that maximum beside the stock number so a later procurement change cannot quietly reduce the available width.