User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Aโ€“Z, 0โ€“9, - . $ / + % SPACE (max 40 chars)
Enter text and click Generate
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Code 39 (also called Code 3 of 9) is a variable-length, discrete barcode symbology defined in ISO/IEC 16388. Each character is encoded as 9 elements - 5 bars and 4 spaces - of which exactly 3 are wide. The symbology supports 43 characters: uppercase A - Z, digits 0 - 9, and symbols - . $ / + % SPACE. The asterisk * serves exclusively as start/stop delimiter and must not appear in payload data. An incorrect narrow-to-wide ratio or omitted quiet zone causes scanner read failures. This tool generates specification-compliant barcodes with optional modulo-43 check digit computation.

The optional check digit improves error detection but is not required by the base specification. Some industries (U.S. Department of Defense LOGMARS, HIBC) mandate it. This generator assumes a minimum quiet zone of 10ร— the narrow bar width on each side, per ISO/IEC 16388 ยง6.3.4. Rendered output is pixel-aligned to prevent anti-aliasing artifacts that degrade scan reliability.

code 39 barcode generator 3 of 9 barcode maker code 39 barcode

Formulas

The optional check digit is computed using modulo-43 arithmetic over the encoded payload:

C = nโˆ‘i=1 vi43 (remainder)

where vi is the numeric value (0 - 42) assigned to the i-th character, and n is the payload length. The character corresponding to value C is appended before the stop character. Total barcode width in modules: W = (n + 2) ร— (6w + 3r) + (n + 1) ร— g, where w = wide element width, r = narrow element width, and g = inter-character gap (typically 1 narrow unit).

Reference Data

CharacterPattern (N=narrow, W=wide)Value (mod 43)
0NnNwWnWnN0
1WnNwNnNnW1
2NnWwNnNnW2
3WnWwNnNnN3
4NnNwWnNnW4
5WnNwWnNnN5
6NnWwWnNnN6
7NnNwNnWnW7
8WnNwNnWnN8
9NnWwNnWnN9
AWnNnNwNnW10
BNnWnNwNnW11
CWnWnNwNnN12
DNnNnWwNnW13
EWnNnWwNnN14
FNnWnWwNnN15
GNnNnNwWnW16
HWnNnNwWnN17
INnWnNwWnN18
JNnNnWwWnN19
KWnNnNnNwW20
LNnWnNnNwW21
MWnWnNnNwN22
NNnNnWnNwW23
OWnNnWnNwN24
PNnWnWnNwN25
QNnNnNnWwW26
RWnNnNnWwN27
SNnWnNnWwN28
TNnNnWnWwN29
UWwNnNnNnW30
VNwWnNnNnW31
WWwWnNnNnN32
XNwNnWnNnW33
YWwNnWnNnN34
ZNwWnWnNnN35
-NwNnNnWnW36
.WwNnNnWnN37
SPACENwWnNnWnN38
$NwNwNwNnN39
/NwNwNnNwN40
+NwNnNwNwN41
%NnNwNwNwN42
* (Start/Stop)NwNnWnWnN -

Frequently Asked Questions

Code 39 supports 43 characters: uppercase letters A - Z, digits 0-9, and the symbols - . $ / + % and SPACE. The asterisk (*) is reserved as the start/stop delimiter and cannot appear in the data payload. Lowercase letters must be converted to uppercase before encoding.
The check digit is optional in the base ISO/IEC 16388 specification. However, specific industry standards mandate it: U.S. Department of Defense LOGMARS (MIL-STD-1189B), HIBC (Health Industry Bar Code), and some automotive supply chain systems. Enable it when your receiving system expects Code 39 mod 43.
ISO/IEC 16388 specifies a minimum quiet zone (clear area before the first bar and after the last bar) of 10 times the narrow element width, or 6.4 mm, whichever is greater. This generator automatically adds the required quiet zone. Printing the barcode too close to a page edge or adjacent graphic will cause scan failures.
The specification permits ratios from 2.0:1 to 3.0:1. A ratio of 3.0:1 produces the most reliable scans but increases total barcode width. Ratios below 2.2:1 are discouraged for printing methods with significant ink spread (e.g., flexographic printing). This generator defaults to 3.0:1.
There is no specification-imposed maximum. The practical limit is determined by the available print area and scanner field of view. Most handheld scanners reliably read up to 30-40 characters. Beyond that, consider Code 128 for higher data density. This generator limits input to 40 characters to ensure the barcode remains scannable at reasonable sizes.
Common causes: insufficient quiet zone (surrounding graphics or text too close), narrow-to-wide ratio below 2.0:1, print resolution under 200 DPI causing bar merging, excessive ink spread filling narrow spaces, or damaged/wrinkled media. Download the PNG at the highest resolution offered and verify the printed narrow bar is at least 0.19 mm (7.5 mil) wide.