^FX Comment

Inserts a non-printing comment into the ZPL format for documentation purposes.

Supported in ZPL Preview

^FX marks the beginning of a comment. The rest of the line (up to ^FS or a new command) is treated as a comment and is completely ignored by the printer. No output is generated. The comment text cannot contain the ^FS sequence without terminating it.

Comments are invaluable for documenting complex label formats — labeling sections, explaining non-obvious coordinate choices, recording version info, or noting which variables are expected. In production ZPL files that are stored on printers or in archives, comments are the only self-documentation available.

Unlike some languages, ZPL has no multi-line comment syntax. Each commented line needs its own ^FX. Some ZPL generators strip comments before sending to the printer to reduce data transfer; for stored formats where file size matters, this is a sensible optimization.

^FX content is sent to and stored by the printer if the format is downloaded with ^DF. It does not appear on the printed label.

Syntax

^FXc

Parameters

ParameterTypeDefaultDescription
cstringoptionalComment text. Not printed. Must not contain ^FS or the text will terminate early.

Examples

Documented label format with comments

Try in Viewer
^XA
^FX === Shipping Label v2.1 ===
^FX Fields: recipient name, address, tracking barcode
^CF0,28,28
^FO50,40^A0N,48,48^FDShipping Label^FS
^FX --- Recipient block ---
^FO50,105^FDJohn Doe^FS
^FO50,140^FD456 Oak Ave, Portland OR 97201^FS
^FX --- Barcode ---
^FO50,185^BY2,3,90^BCN,90,Y,N,N^FD1Z999AA10123456784^FS
^XZ

Version comment at label start

Try in Viewer
^XA
^FX Product label — v1.0 — Updated 2026-01
^FO50,50^A0N,36,36^FDProduct: Widget A^FS
^XZ

Common Mistakes

  • !Putting ^FS inside the comment text — it terminates the comment early and the printer may try to parse the rest as a command.
  • !Expecting comments to appear in the printed output — they are invisible; use a ^FD text field for printed labels or notes.
  • !Using comments to "comment out" ZPL commands — ^FX only skips text, not ZPL command syntax that follows on the same or next line.
^FX Comment — ZPL Command Reference | Prynta Co | Prynta Co