^BC Code 128 Bar Code

Prints a Code 128 barcode — the standard for shipping labels, inventory, and supply chain applications.

Supported in ZPL Preview

The ^BC command generates a Code 128 barcode — one of the most widely used linear barcode formats. Code 128 can encode the full ASCII character set and is extremely compact. It is the standard for shipping labels (including FedEx, UPS, and USPS), inventory systems, and supply chain applications.

^BC automatically switches between three internal subsets (A, B, and C) to minimize barcode length. Subset C is especially efficient for pairs of digits, making it ideal for numeric-heavy data like tracking numbers.

The barcode height is specified in dots. The human-readable interpretation line (text printed below the barcode) is optional and controlled by the fourth parameter.

For GS1-128 / UCC-EAN-128 barcodes used in retail and logistics, pass the Application Identifier data in the ^FD field and set the mode parameter to U in ^BC.

Syntax

^BCo,h,f,g,e[,m]

Parameters

ParameterTypeDefaultDescription
oN | R | I | BNOrientation: N = normal, R = rotated 90°, I = inverted 180°, B = bottom-up 270°.
hinteger10Bar code height in dots.
fY | NYPrint interpretation line (human-readable text below barcode).
gY | NNPrint interpretation line above the barcode.
eY | NNUCC check digit: Y = add check digit, N = no check digit.
mN | U | A | DNMode: N = standard, U = UCC case mode, A = auto, D = UCC/EAN-128.

Examples

Standard Code 128 with human-readable text

Try in Viewer
^XA
^FO50,50^BY2,3,90^BCN,90,Y,N,N^FD123456789012^FS
^XZ

Code 128 rotated 90 degrees

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

Common Mistakes

  • !Omitting the ^BY command before ^BC — ^BY sets bar width ratio and height defaults that ^BC inherits.
  • !Encoding characters not in the Code 128 character set — most control characters require subset A.
  • !Setting height (h) smaller than the minimum readable by your scanner — most scanners need at least 50 dots at 203 DPI.
^BC Code 128 Bar Code — ZPL Command Reference | Prynta Co | Prynta Co