The symbologies, with working ZPL
Every snippet below is exactly what MakeZPL emits for that barcode type. Drop one between
^XA and ^XZ and it will print.
Code 128 — ^BC
The default choice for anything alphanumeric: SKUs, order numbers, licence plates, GS1 data.
Data rules: Any ASCII character from space to ~ (32–127).
^FO30,60
^BY3,2,90
^BCN,90,Y,N,N
^FD4125500001^FS
Dense, self-checking and variable length. If you do not have a reason to pick something else, pick this.
Code 39 — ^B3
Older warehouse and automotive systems, and anywhere a scanner is configured for Code 39 only.
Data rules: Digits, uppercase A–Z, and - . space $ / + %. Lowercase will not encode.
^FO30,60
^BY3,2,90
^B3N,N,90,Y,N
^FDBIN-C14^FS
About 30% wider than Code 128 for the same data. The second parameter turns the mod-43 check digit on.
UPC-A — ^BU
Retail products sold in North America.
Data rules: 11 or 12 digits. Give 11 and the printer calculates the check digit.
^FO30,60
^BY3,2,90
^BUN,90,Y,N,Y
^FD07253100640^FS
Fixed length and fixed proportions — do not squeeze it below about 80% of nominal size or scanners at the till will struggle.
EAN-13 — ^BE
Retail products sold outside North America.
Data rules: 12 or 13 digits.
^FO30,60
^BY3,2,90
^BEN,90,Y,N
^FD501234567890^FS
The 13th digit is the check digit; supply 12 and the printer works it out.
EAN-8 — ^B8
Small retail packaging where a full EAN-13 will not fit.
Data rules: 7 or 8 digits.
^FO30,60
^BY3,2,90
^B8N,90,Y,N
^FD9638507^FS
Only use it when EAN-13 genuinely does not fit — the shorter number space is allocated separately.
Interleaved 2 of 5 — ^B2
Cartons and outer packaging, especially ITF-14 shipping container codes.
Data rules: Digits only, and an even number of them.
^FO30,60
^BY3,2,90
^B2N,90,Y,N,N
^FD00104822000037^FS
An odd digit count is the classic ITF bug: the printer pads it and the scan comes back wrong. MakeZPL blocks the export instead.
QR code — ^BQ
Linking a label to a record, a URL or a maintenance history from a phone camera.
Data rules: Any text, including URLs and multi-line payloads.
^FO30,60
^BQN,2,6
^FDQA,https://example.com/asset/41255^FS
The Q in ^FDQA, is the error-correction level (H, Q, M or L) and A is automatic input mode. The third ^BQ parameter is magnification, 1–10.
Data Matrix — ^BX
Marking small parts, PCBs and instruments where there is very little room.
Data rules: Any text. Denser than QR at small sizes.
^FO30,60
^BXN,6,200
^FD41255-A^FS
The second parameter is the module size in dots and the third is the quality level; 200 is the modern ECC 200 encoding.