^B3 Code 39 Bar Code

Prints a Code 39 barcode — common in manufacturing, healthcare, and automotive industries.

Supported in ZPL Preview

^B3 generates a Code 39 (also called "3 of 9") barcode. Code 39 is one of the oldest and most widely deployed 1D barcode standards, supported by nearly every barcode scanner. Its character set includes uppercase letters (A–Z), digits (0–9), space, and a handful of special characters (-, ., $, /, +, %).

Code 39 encodes each character as 5 bars and 4 spaces, with 3 of the 9 elements being wide. This "3 of 9" structure gives the format its name. The start and stop characters (*) are automatically added by the printer — do not include them in the ^FD data.

The format supports an optional modulo-43 check character (e parameter). Some industries require it (healthcare uses HIBC which mandates the check character); others don't. Only enable it if your scanner expects it.

Code 39 Extended (via ^B3 with extended mode) encodes the full 128-character ASCII set by using pairs of standard characters for non-standard symbols. This increases barcode length.

Compared to Code 128, Code 39 produces longer barcodes for the same data but is simpler to implement and has no variable-length check calculation.

Syntax

^B3o,e,h,f,g

Parameters

ParameterTypeDefaultDescription
oN | R | I | BNOrientation: N = normal, R = 90°, I = 180°, B = 270°.
eY | NNCheck character: Y = calculate and print Modulo 43 check digit, N = none.
hintegerBY defaultBarcode height in dots. Defaults to the ^BY height if set.
fY | NYPrint interpretation line (human-readable text below barcode).
gY | NNPrint interpretation line above the barcode.

Examples

Standard Code 39 barcode

Try in Viewer
^XA
^FO50,50^BY2,3,80^B3N,N,80,Y,N^FDABC-12345^FS
^XZ

Code 39 with check character enabled

Try in Viewer
^XA
^FO50,50^BY2,3,80^B3N,Y,80,Y,N^FD123456^FS
^XZ

Common Mistakes

  • !Including * (asterisk) in the data — the printer adds start/stop characters automatically; adding them manually doubles the marker.
  • !Using lowercase letters in Code 39 data without Extended mode — Code 39 native only supports uppercase.
  • !Enabling the check character without confirming the scanner expects it — mismatched check digit expectations cause scan failures.
^B3 Code 39 Bar Code — ZPL Command Reference | Prynta Co | Prynta Co