Reference
ZPL Command Reference
45 commands with syntax, parameter tables, defaults and a live example rendered right on the page. Every example opens in the viewer with one click.
Label format
- ^XAStart FormatPreview: partial
Opens a label format. Every ZPL label begins with ^XA, and the printer ignores field commands that arrive before it.
- ^XZEnd FormatPreview: partial
Closes a label format and tells the printer to image and feed the label. Without it, nothing prints.
- ^PWPrint WidthPreview: exact
Sets the printable width in dots. Anything to the right of it is clipped, which is the usual cause of labels cut off on one side.
- ^LLLabel LengthPreview: exact
Sets the label length in dots. On continuous media it is what defines where one label ends and the next begins.
- ^LHLabel HomePreview: exact
Moves the label origin. Every later ^FO and ^FT is measured from this point rather than from the top-left corner.
- ^MCMap ClearPreview: partial
Enables or disables the printer's variable-data mode, used with ^FV to update a field without sending the full format again.
- ^DFDownload FormatPreview: partial
Stores a named ZPL template on the printer so later labels can recall its layout and provide only variable data.
- ^XFRecall FormatPreview: partial
Recalls a named stored format and fills its numbered fields with data in the current print job.
- ^LSLabel ShiftPreview: partial
Offsets all following field origins horizontally, providing a format-wide left/right print adjustment in dots.
- ^LTLabel TopPreview: partial
Offsets all following field origins vertically, providing a format-wide up/down print adjustment in dots.
- ^POPrint OrientationPreview: partial
Selects normal or inverted print orientation for the label image.
Fields
- ^FOField OriginPreview: partial
Places the top-left corner of the next field. It is the command you will use more than any other.
- ^FTField TypesetPreview: partial
Places a field by its baseline rather than its top-left corner, so text of different sizes lines up.
- ^FDField DataPreview: exact
Supplies the content of a field — the text, the barcode payload or the QR data.
- ^FNField NumberPreview: partial
Marks a field by number so a stored format can receive its data when the printer recalls it.
- ^FSField SeparatorPreview: exact
Ends the current field. Every field needs one, and a missing ^FS makes the rest of the label print as part of it.
- ^FHField Hexadecimal IndicatorPreview: exact
Lets ^FD carry bytes written as _XX escapes — the only way to print a literal ^ or ~ in field data.
- ^FRField Reverse PrintPreview: exact
Inverts the next field against its background: black becomes white, so text can be knocked out of a filled box.
- ^FWField OrientationPreview: partial
Turns every following field a quarter, half or three-quarter turn, so a template can be rotated without touching each command.
- ^FXCommentPreview: exact
Adds a non-printing comment. Convenient for labelling sections of a template, with one sharp edge around carets.
- ^FVField VariablePreview: partial
Supplies one variable-data field for a printer format that uses ^MC, avoiding a full format download for every label.
- ^SNSerialized DataPreview: partial
Places a serial value that the printer can increment between labels in a print run.
Text and fonts
- ^AScalable / Bitmap FontPreview: partial
Selects the font, size and rotation for the next field. ^A0 is the scalable font used by most modern templates.
- ^CFChange Alphanumeric Default FontPreview: partial
Sets the font and size used by every following field that does not specify its own, so you can stop repeating ^A.
- ^FBField BlockPreview: partial
Wraps field data into a fixed-width text block with a line limit, justification and an optional hanging indent.
- ^CIChange International Font/EncodingPreview: partial
Selects the printer character set or Unicode encoding used to interpret later field data.
Barcodes
- ^BYBar Code Field DefaultPreview: partial
Sets the module width, ratio and height that following barcodes inherit. Module width is the main lever on whether a barcode scans.
- ^BCCode 128 Bar CodePreview: partial
Draws a Code 128 barcode — the symbology almost every shipping label uses for tracking numbers.
- ^BQQR Code Bar CodePreview: partial
Draws a QR code. The data field takes a mode prefix that is easy to get wrong and is a frequent source of unreadable symbols.
- ^B3Code 39 Bar CodePreview: partial
The workhorse of industrial labelling: uppercase letters, digits and a handful of symbols, readable by every scanner ever made.
- ^BACode 93 Bar CodePreview: partial
A denser, continuous relative of Code 39 that carries the full ASCII set — when the scanner is configured to read it.
- ^BEEAN-13 Bar CodePreview: partial
The retail bar code used everywhere outside North America. Twelve digits in, and the printer works out the thirteenth.
- ^B8EAN-8 Bar CodePreview: partial
The short EAN, for products too small to carry a full EAN-13: seven digits plus a check digit.
- ^BUUPC-A Bar CodePreview: partial
The North American retail bar code: eleven digits plus a check digit, in a fixed 95-module symbol.
- ^B2Interleaved 2 of 5 Bar CodePreview: partial
A very dense numeric symbology — and the one most likely to be misread if you use it without a check digit.
- ^BKANSI Codabar Bar CodePreview: partial
An older numeric symbology kept alive by libraries, blood banks and courier systems, with letters A–D marking where the data starts and stops.
- ^B7PDF417 Bar CodePreview: partial
A stacked 2D symbology that holds a paragraph rather than a number — the code on driving licences and shipping manifests.
- ^BXData Matrix Bar CodePreview: partial
The compact square 2D code: a lot of data in a few millimetres, readable even when part of it is damaged.
Graphics
- ^GBGraphic BoxPreview: partial
Draws a box or a line. With thickness equal to the height it becomes a solid bar — the basis of every reversed header.
- ^GCGraphic CirclePreview: partial
Draws a circle with a diameter, border thickness and colour at the current field origin.
- ^GDGraphic Diagonal LinePreview: partial
Draws a diagonal line across a rectangular field, with selectable rising or falling lean.
- ^GEGraphic EllipsePreview: partial
Draws an ellipse inside a width and height, with a configurable border thickness and colour.
- ^GFGraphic FieldPreview: partial
Embeds a bitmap directly in the label — the command every PDF-to-ZPL and image-to-ZPL conversion produces.
- ^XGRecall GraphicPreview: partial
Draws a bitmap that was downloaded to the printer once, instead of resending it with every label.
- ~DGDownload GraphicPreview: partial
Stores an ASCII-hex bitmap in printer memory under a name, so later labels can recall it with ^XG instead of carrying the whole image.