Home›ZPL commands list and reference

ZPL commands list and reference

Complete ZPL commands list grouped by task: format and position, text and fonts, barcodes, graphics, media setup. Syntax, parameter ranges, runnable examples.

How a ZPL format is built

Every label starts with ^XA and ends with ^XZ. In between, each field is three parts: a position (^FO x,y), the content (^FD…^FS) and an optional format command (font ^A, barcode ^BC). Coordinates are printer dots, not millimetres — at 203 DPI one inch is 203 dots.

^XA
^FO50,50^A0N,40,40^FDHello^FS
^FO50,110^BY2^BCN,80,Y,N,N^FD12345678^FS
^XZ

ZPL commands list by task

The commands each job needs, one per line. Every link opens the command's own page with syntax, parameter ranges and an example; the printable version of this list is the ZPL cheat sheet.

Format and position

Open and close a label, end each field and place it: ^FO from the top-left corner, ^FT from the text baseline; ^LH, ^LS and ^LT shift the whole label.

  • ^XA Start Format
  • ^XZ End Format
  • ^FS Field Separator
  • ^FO Field Origin
  • ^FT Field Typeset
  • ^LH Label Home
  • ^LS Label Shift
  • ^LT Label Top
  • ^FX Comment

Text and fonts

Field data, font and size, the default font, the character set (^CI28 for UTF-8), wrapping text blocks, hex escapes, rotation and reverse print.

  • ^FD Field Data
  • ^A Font Selection
  • ^CF Change Default Font
  • ^CI Character Set
  • ^FB Field Block
  • ^TB Text Block (width and height)
  • ^FH Field Hexadecimal Indicator
  • ^FW Field Orientation
  • ^FR Field Reverse Print
  • ^FV Field Variable
  • ^PA Advanced Text Properties
  • ^CW Font Identifier

Barcodes

^BY sets the module width and default height for the barcode that follows; then one command per symbology, 1D and 2D.

Graphics and images

Boxes and lines (^GB), circles, ellipses, diagonal lines, embedded bitmaps (^GF) and graphics stored in printer memory.

  • ^GB Graphic Box
  • ^GC Graphic Circle
  • ^GD Graphic Diagonal Line
  • ^GE Graphic Ellipse
  • ^GF Graphic Field
  • ^IM Image Move
  • ^DG Download Graphic
  • ^XG Recall Graphic

Media and printer setup

Label width and length, print orientation, reversing the whole label, units of measurement and how many copies to print.

  • ^PW Print Width
  • ^LL Label Length
  • ^PO Print Orientation
  • ^PM Printing Mirror Image of Label
  • ^LR Label Reverse
  • ^MU Set Units of Measurement
  • ^PQ Print Quantity

Printable ZPL cheat sheet →

For a printable one-page summary see the ZPL cheat sheet; to try a command right now, the online ZPL viewer. ZPL cheat sheet · online ZPL viewer

ZPL lint rules →

Format control

Positioning and text

Graphics

Barcodes

Advanced

Labelixa extension (preview)

RFID

Printer settings