^B3 Code 39 Barcode
Prints a Code 39 barcode, which reaches the full 128-character ASCII set through paired characters, from the data of the next field.
^B3o,e,h,f,g
^B3 parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 70 |
Direction in which the barcode is rotated. |
|
The current |
eMod-43 check digitp. 70 |
Whether a Mod 43 check digit is added to the code. In the Format line the check digit comes second, ahead of the height. |
|
N
|
hbar code height (in dots)p. 70 |
Height of the bars in dots. |
|
The height set by |
fprint interpretation linep. 70 |
Whether the human-readable text of the data is printed with the barcode. When the line is printed, the start and stop asterisks are printed in it too. |
|
Y
|
gprint interpretation line above codep. 70 |
Whether the interpretation line is printed above the barcode instead of below it. |
|
N
|
^B3 notes and gotchas
-
Gotcha
Extended ASCII is handled by the scanner and not by the barcode itself, so the scanner has to have it enabled. The guide says to put +$ at the start of the field data to turn it on in a Code 39 barcode and -$ in the data to turn it off.
p. 71 -
Interaction
Field data is limited by
p. 190^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly. -
Note
The code accepts print ratios from 2.0:1 to 3.0:1, so the ratio set with
pp. 70, 148, 1587^BYapplies to it. -
Note
The field data is limited to the width of the label (or its length, if the barcode is rotated).
p. 70 -
Note
The printer generates the start and stop character (an asterisk) by itself, so they are not part of the field data.
p. 70 -
Note
Code 39 can encode the full 128-character ASCII set by using paired characters. In the guide's table digits, upper-case letters, the hyphen and the period stand for themselves, the space is written as the word Space, lower-case letters a to z are written as a plus sign followed by the capital letter, and control characters and punctuation use pairs that start with $, / or %.
pp. 71 to 73 -
Note
The guide describes the Mod 43 check digit in its Mod 43 section, where it calls the result a check digit even when that is a letter such as T: each character of the Code 39 set has a value (0 to 9 are 0 to 9, A is 10 and so on up to L at 21, X to Z are 33 to 35, then - 36, . 37, space 38, $ 39, / 40, + 41, % 42), the values of the data characters are added, the sum is divided by 43, and the check digit is the character whose value equals the remainder.
p. 1592 -
Guide issue
The Mod 43 section lists character values only for 0 to 9, A to L and X to Z, so the values of M to W are not shown, although its worked example reads the remainder 29 as the letter T. The example's data string 2345ABCDE/ has character values 2, 3, 4, 5, 10, 11, 12, 13, 14 and 40, which add up to 114, but the sum line begins with an extra 1 and totals 115.
p. 1592 -
Guide issue
The ASCII table (Table 1) repeats some rows. FS is printed for both %B and %C, the apostrophe is printed in two rows (with /G and with %W), and the DEL row prints %T twice. The table also has no row for NUL (it starts at SP and SOH), although the page says the full 128-character set can be encoded. The guide does not explain these points, so check any pair you rely on against the barcode you intend to produce.
pp. 72, 73
^B3 example
^XA ^FO40,40^B3N,Y,90,Y,N^FDPART4471^FS ^XZ
A Code 39 barcode with a Mod 43 check digit requested, not rotated and 90 dots high, with the interpretation line printed below it. The data uses only upper-case letters and digits, which stand for themselves in the code.
Guides that use ^B3
BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.
Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 68, 70 to 73, 94, 148, 190, 208, 1587, 1592.
Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.