Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›ZPL Lint Rules›ZPL0003

ZPL0003 — Nested ^XA

A second ^XA starts while the previous format is still open. Printers treat this as one garbled format; fields from both labels end up on one label or are dropped.

SeverityError
CategoryStructure

Label that triggers it

^XA^FO50,50^A0N,40^FDONE^FS^XA^FO50,120^A0N,40^FDTWO^FS^XZ

Finding: ZPL0003 · line 1:28 — Nested ^XA — a new format starts before the previous one is closed

Open the broken label in the editor →

How to fix it

Close the first format with ^XZ before opening the next one. One ^XA…^XZ pair per label.

Corrected label

^XA^FO50,50^A0N,40^FDONE^FS^XZ^XA^FO50,120^A0N,40^FDTWO^FS^XZ

Open the corrected label in the editor

Commands involved

^XA · ^XZ

ZPL0001 Missing ^XA · ZPL0002 Missing ^XZ · ZPL0004 ^XZ without ^XA

In CI

npx labelixa validate "labels/**/*.zpl" lints your files and prints this page's address next to each finding. /docs/cli

Lint your ZPL now