How to create a Code 39 barcode
- Enter your data in the box above. Capital letters A–Z, digits, space and - . $ / + %. Lower case is rejected (use Code 39 Extended). Do not type the * start/stop characters. A mod 43 check character is added and shown at the end.
- The barcode updates live as you type. Open Customize to change the bar height, colors, rotation or quiet zone.
- Click Download PNG for labels and documents, or SVG / PDF for print and packaging design.
- Test it with our online barcode scanner before you print a large run.
What is a Code 39 barcode?
Code 39, also called Code 3 of 9 or USD-3, is a variable-length linear barcode that encodes 43 characters: A–Z, 0–9, space and - . $ / + %. Each character is made of 9 elements (5 bars and 4 spaces), 3 of which are wide, which is where the name comes from.
It was developed by Intermec in 1974 and is self-checking, so a check character is optional. It is wide compared with Code 128, but it is simple, robust and supported by every scanner ever made. Every Code 39 barcode starts and ends with an asterisk (*), which is added automatically.
Where Code 39 is used
- ID badges, employee cards and library cards
- Asset tags and equipment labels
- US Department of Defense LOGMARS labels
- Automotive industry parts labels (AIAG)
- Healthcare labels via HIBC Code 39
- Barcode fonts in spreadsheets and Word documents
Code 39 specifications
| Type | Linear (1D), variable length, discrete |
|---|---|
| Characters | 43: A–Z, 0–9, space, - . $ / + % |
| Start/stop | * (added automatically, shown in the text) |
| Check digit | Optional modulo 43 (on by default here) |
| Wide:narrow ratio | 2:1 to 3:1 |
| Density | Low: about 13–16 modules per character |
| Standard | ISO/IEC 16388 |
Tips for a barcode that scans first time
- Keep it short. Code 39 gets long fast, and a barcode wider than about 15 cm is hard to scan by hand.
- If your system already includes its own check character in the data, the generator still adds a mod 43 check. Make sure the reader is set up to expect it.
- Leave a quiet zone of at least 10 times the narrow bar width on each side.
- For lower case or punctuation like # or @, use Code 39 Extended or Code 128.
Frequently asked questions
What characters can Code 39 encode?
43 characters: capital A–Z, digits 0–9, space and the symbols - . $ / + %. Lower case letters and other symbols need Code 39 Extended, which encodes all 128 ASCII characters using pairs.
Does Code 39 need a check digit?
No, it is optional because each character is self-checking. A modulo 43 check character adds extra safety and is switched on in this generator. It appears as the last character of the text under the bars.
Do I need to add the asterisks?
No. The * start and stop characters are added automatically. Typing them yourself causes an error, because * is not a valid data character.
Code 39 vs Code 128: which is better?
Code 128 is shorter for the same data and supports lower case. Use Code 39 when a system, customer or standard asks for it, such as LOGMARS or an older badge reader. Otherwise Code 128 is usually the better choice.
Why is it called Code 3 of 9?
Each character is made of 9 bars and spaces, and 3 of those 9 are wide. Code 39, Code 3 of 9 and 3 of 9 barcode are all the same symbology.
How long can a Code 39 barcode be?
The standard has no fixed limit, but the barcode grows by about 13 to 16 modules per character. In practice keep it under about 20 to 25 characters for easy handheld scanning.