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›ZPL4002

ZPL4002 — EAN-13 data is not 12–13 digits

^BE (EAN-13) needs 12 digits (the check digit is computed) or 13. Any other length cannot be encoded and the barcode is not drawn.

SeverityWarning
CategoryBarcodes

Label that triggers it

^XA^FO50,50^BY2^BEN,100,Y,N^FD12345^FS^XZ

Finding: ZPL4002 · line 1:28 — EAN-13 data must be 12–13 digits; 5 characters given — the barcode will not be drawn

Open the broken label in the editor →

How to fix it

Supply exactly 12 or 13 digits and nothing else. Fields whose data comes from ^FH hex escapes or serial numbers are not checked.

Corrected label

^XA^FO50,50^BY2^BEN,100,Y,N^FD123456789012^FS^XZ

Open the corrected label in the editor

Commands involved

^BE

ZPL4001 Barcode without data · ZPL4003 GS1 data without GS1 mode (no FNC1) · ZPL4004 GS1 check digit is wrong · ZPL4005 GS1 AI value has the wrong length · ZPL4006 GS1 check digit set by the printer

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