Code 39 Barcode Generator
This Code 39 barcode generator makes the code that everything reads. It is older and less compact than Code 128, but that universality is exactly why it survives in asset tagging, defence and government systems.
On this page
Build your Code 39 code
Size, colour and export options
Never set this to zero. A cropped quiet zone is the most common reason a printed barcode will not scan.
Preview
What was checked
Verify any code by test scanning a printed sample before a production run. Provided as is, and used at your own risk. See the terms.
What Code 39 is
Code 39, sometimes written Code 3 of 9, encodes 43 characters: the digits 0 to 9, capital letters A to Z, a space, and the six symbols hyphen, period, dollar, slash, plus and percent. Lowercase letters are not in the standard set.
Each character is nine elements wide, three of them wide bars or spaces, which is where the name comes from. That structure makes it self-checking and easy to decode, at the cost of taking noticeably more width per character than Code 128.
A Full ASCII mode exists, encoding the remaining characters as two-character sequences, but it doubles the width for those characters and not every scanner is configured to interpret it.
The check character is modulo 43 and is optional, unlike Code 128 where it is mandatory. Many systems that specify Code 39 also specify whether they want it.
Code 39 specification
| Character set | 43 characters: 0 to 9, A to Z, space, and - . $ / + % |
|---|---|
| Length | Variable |
| Check character | Modulo 43, optional |
| Wide to narrow ratio | Between 2.0 and 3.0 |
| Symbol height | At least 5.0mm, or 15% of symbol width, whichever is greater |
| Quiet zone | At least 10 times the X-dimension |
| Governed by | ISO/IEC 16388 |
Two things that catch people out
First, lowercase. The standard 43-character set is uppercase only. Typing a lowercase value either gets rejected or silently uppercased depending on the tool, and this generator tells you rather than guessing.
Second, minimum length. Many scanners ship with a default that refuses Code 39 values shorter than four characters, as a guard against misreads. A three-character asset tag may encode perfectly and still fail to scan until the reader is reconfigured.
Sources
Every specification figure on this page traces to one of the following. Nothing is stated here that could not be checked against them.
- ISO/IEC 16388, Code 39 symbology specification
- bwip-js, MIT-licensed barcode encoder implementing the ISO/IEC symbologies
Last reviewed 6 September 2026
This page is maintained by Cedrick Reese at Ready Utilities. The Code 39 character set, the optional modulo 43 check character, the wide to narrow ratio range and the minimum height rule are defined in ISO/IEC 16388, and encoding is performed by the MIT-licensed bwip-js library at a pinned version. The scanner minimum-length behaviour described above is a common default rather than a specification requirement, and is stated as such.
Common questions
Does Code 39 support lowercase letters?
Not in the standard 43-character set, which is uppercase only. A Full ASCII extension exists, but it encodes each lowercase letter as two characters, which widens the symbol and is not supported by every scanner configuration.
Should I use Code 39 or Code 128?
Code 128 if you control the scanners, because it is denser and takes the full ASCII set. Code 39 if you are feeding a legacy system, a government process, or hardware you cannot reconfigure, since almost everything reads it.
Is the Code 39 check digit required?
No, it is optional under the specification. Some systems require it and some reject it, so check what the receiving system expects before you print.
Why will my short Code 39 barcode not scan?
Many scanners default to refusing Code 39 values under four characters to guard against misreads. The barcode is likely fine; the reader needs its minimum length setting lowered.