Most Common ZPL Commands
Complete command reference for Zebra printer programming
ZPL Command Reference
ZPL uses commands that begin with ^ (caret) or ~ (tilde). Commands with ^ are used within the label format, while commands with ~ are used for printer configuration.
Command categories
Format commands
| Comando | Descripción | Ejemplo | Parámetros |
|---|---|---|---|
| ^XA | Start label format | ^XA ... ^XZ | No parameters |
| ^XZ | End label format | ^XA ... ^XZ | No parameters |
| ^FO | Field origin (X,Y position) | ^FO100,200 | x,y - Coordinates in dots |
| ^FS | Field separator (end field) | ^FDText^FS | No parameters |
Text commands
| Comando | Descripción | Ejemplo | Parámetros |
|---|---|---|---|
| ^A | Font selection | ^A0N,30,30 | f,o,h,w - Font, orientation, height, width |
| ^FD | Field data (text to print) | ^FDMy text^FS | text - Content to print |
| ^FB | Text block (multiline) | ^FB400,3,0,L,0 | width,lines,spacing,alignment,indent |
Barcode commands
| Comando | Descripción | Ejemplo | Parámetros |
|---|---|---|---|
| ^BC | Code 128 barcode | ^BCN,100,Y,N,N | o,h,f,g,e - Orientation, height, interpretation, etc. |
| ^BQ | QR Code | ^BQN,2,5 | o,model,magnification |
| ^BY | Barcode configuration | ^BY2,3,100 | module_width,ratio,height |
Graphic commands
| Comando | Descripción | Ejemplo | Parámetros |
|---|---|---|---|
| ^GB | Draw box/rectangle | ^GB200,100,3^FS | width,height,line_thickness |
| ^GF | Graphic field (image) | ^GFA,data... | format,bytes,bytes_per_row,data |
Validate your ZPL code
Use our validator to verify your ZPL code is correct.