Code 39 barcode generator
The asset tag and work order barcode. It needs no check digit because it is self-checking, its alphabet is 43 characters, and it is the closest thing the linear world has to something every scanner ever built will read.
Why it is called 3 of 9
Every Code 39 character is nine elements, five bars and four spaces, of which exactly three are wide. That constraint is the name and it is also the error detection: a misread that turns a wide element narrow, or the reverse, produces a pattern with the wrong number of wide elements, and there is no valid character it can be mistaken for.
This is what self-checking means, and it is why Code 39 is used without a check digit. The symbology can add a modulo 43 one, and almost nobody does, because the structure already catches the single-element errors that scanning actually produces.
The alphabet is 43 characters, and that is the catch
Digits, uppercase A to Z, space, and the six symbols hyphen, period, dollar, slash, plus and percent. That is the whole set, counted from this encoder: 43 characters. There is no lowercase, so lowercase input is converted rather than refused, which is worth knowing if you are encoding something case sensitive.
There is a Full ASCII convention that reaches the rest by using pairs of these characters, and it only works if the reader has been told to expect it. If you need lowercase or punctuation to survive, Code 128 carries it natively and is the better choice.
The asterisks are part of the symbol, not your data
A Code 39 symbol starts and ends with an asterisk, which is a delimiter rather than content. You do not type them and a decoder does not report them, so the text under the bars here shows your data while the symbol itself carries the delimiters. Both are correct; they are answers to different questions.
It matters for testing. If a decoder hands you back asterisks, it is reporting the symbol rather than the data, and any string comparison against your input will fail for a reason that has nothing to do with the barcode.
When to use it anyway, given it is the widest
Code 39 costs 285 modules for twenty letters, where Code 93 needs 217 and Code 128 needs 255. It loses on size to both. What it wins on is reach: it is old, it is simple, and every handheld, wedge and inventory system in service can read it without configuration.
So use it for asset tags, shelf labels, maintenance tickets and anything a stranger's scanner has to read on the first try. Use Code 128 when the data is numeric or long, and Code 93 when it is uppercase and space is tight.
Questions
Why did my lowercase text come out uppercase?
Because Code 39 has no lowercase characters. The encoder converts rather than refusing, which keeps a barcode in your hand instead of an error. If case has to survive the round trip, use Code 128.
Does Code 39 need a check digit?
No. Its nine-element, three-wide structure detects the single-element errors scanning produces, which is why it is called self-checking. A modulo 43 check character exists in the standard and is rarely used.
Can I encode a space?
Yes, space is one of the 43 characters. Whether your downstream system handles a space in an asset ID is a separate question, and one worth testing before you print a few thousand labels.
Why is Code 39 so much wider than the others?
Nine elements per character with no packing and no code sets. That simplicity is exactly what makes it universally readable, so the width is the price of the compatibility rather than a defect.
More barcode generators
GS1-128 barcode generator · ITF-14 barcode generator · Data Matrix generator · Aztec code generator · PDF417 generator · Pharmaceutical barcode generator · Barcode generator · QR code generator