^XA Start Format

Opens a label format — every ZPL label must begin with ^XA.

Supported in ZPL Preview

^XA marks the beginning of a ZPL label format. The printer buffers the entire format before printing, so nothing is processed until it sees ^XA, and nothing after ^XZ belongs to that format.

Every valid ZPL label follows the same skeleton: ^XA at the top, your field definitions in the middle, ^XZ at the bottom. Omitting ^XA causes the printer to silently discard all subsequent commands until it encounters one.

In multi-label jobs, each label is its own ^XA...^XZ block. Formats cannot be nested — an ^XA inside an open format is invalid ZPL and produces unpredictable results. Use ^PQ inside the format to print multiple copies of the same label without repeating the format block.

^XA also resets the field counter and clears per-format state from the previous label, so each format starts clean. On real hardware, the printer's display often shows "PRINT" during format reception and reverts to idle once ^XZ is received and the job completes.

Syntax

^XA

Examples

Minimal valid label

Try in Viewer
^XA
^FO50,50^A0N,36,36^FDHello, World!^FS
^XZ

Two consecutive labels in one job

Try in Viewer
^XA
^FO50,50^A0N,36,36^FDLabel One^FS
^XZ
^XA
^FO50,50^A0N,36,36^FDLabel Two^FS
^XZ

Common Mistakes

  • !Omitting ^XA entirely — the printer silently discards all commands until it sees one.
  • !Sending ^XA without a matching ^XZ — the format stays open, the printer buffers indefinitely, and nothing prints.
  • !Nesting formats (^XA inside an open ^XA) — invalid ZPL that produces unpredictable output.
  • !Putting configuration commands like ^PW or ^LL outside the ^XA...^XZ block — some printers accept this as a persistent setting while others ignore it.
^XA Start Format — ZPL Command Reference | Prynta Co | Prynta Co