^B8 EAN-8 Barcode

Barcodes ZPL caret command

Prints an EAN-8 barcode, the short form of EAN-13, from seven characters of field data.

Format ^B8o,h,f,g

^B8 parameters

Parameters of ^B8
ParameterMeaningAccepted valuesDefault
oorientationp. 83

Direction in which the barcode is rotated.

  • Nnormal
  • Rrotated 90 degrees (clockwise)
  • Iinverted 180 degrees
  • Bread from the bottom up, 270 degrees

The current ^FW value.

hbar code height (in dots)p. 83

Height of the bars in dots.

1 to 32000 dots

The height set by ^BY.

fprint interpretation linep. 83

Whether the human-readable text of the data is printed with the barcode.

  • Yprint the interpretation line
  • Ndo not print it
Y
gprint interpretation line above codep. 83

Whether the interpretation line is printed above the barcode instead of below it.

  • Yabove the code
  • Nnot above the code
N

^B8 notes and gotchas

  • Gotcha

    The field data is limited to exactly seven characters. ZPL II adjusts data of another length on the left side, by adding zeros or by cutting, to reach seven.

    p. 83
  • Interaction

    Field data is limited by ^FD to 3072 bytes and cannot contain the command prefix characters ^ and ~ directly.

    p. 190
  • Note

    The guide describes EAN-8 as the shortened version of the EAN-13 barcode. Each character is made of four elements, two bars and two spaces. The character set drawn on page 84 is the digits 0 to 9.

    pp. 83, 84
  • Note

    The print ratio is fixed. ^B8 is listed in the guide's group of retail labeling barcodes.

    pp. 83, 1587, 1589
  • Note

    For JAN-8, the Japanese use of EAN-8, the first two non-zero digits sent to the printer are always 49.

    p. 83
  • Note

    The guide says 6, 12 and 24 dots/mm printheads produce UPC and EAN symbologies at 100 percent of their size, and an 8 dots/mm printhead produces them at a magnification factor of 77 percent. The statement is made on the ^B9 page and names the UPC and EAN symbologies together.

    p. 85
  • Note

    The guide's introduction to the command pages uses ^B8 as its sample of a Format line and of a parameter table entry (the h parameter), and shows a ^B8 call as its sample of a ZPL example.

    p. 48
  • Note

    Not stated by the guide in text: how the eighth digit of an EAN-8 code is produced. The entry has no check-digit parameter and does not mention a check digit. The guide's sample figure on page 84 is made from seven digits of data and shows an eight-digit interpretation line.

    pp. 83, 84

^B8 example

example.zplZPL
^XA
^FO40,40^B8N,80,Y,N^FD2468135^FS
^XZ

An EAN-8 barcode from seven digits of data, not rotated and 80 dots high, with the interpretation line printed below it (f is Y, g is N).

Guides that use ^B8

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 48, 83 to 85, 148, 190, 201, 1587 to 1589.

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.