Shipping label template in ZPL
A shipping label in ZPL is usually 4 × 6 in (812 × 1219 dots at 203 dpi) with the sender, the recipient, a Code 128 tracking barcode and often a QR code. Copy the template below, change the addresses and the tracking number, and render it to a PNG or PDF through the API.
Aktualisiert am 2026-11-01 · Renders made with the OpenZPL engine
Im Viewer öffnenWhat goes on a shipping label
- Sender and recipient blocks, the recipient larger and lower so it reads at a glance.
- A tracking barcode, almost always Code 128 (
^BC), which packs letters and digits like a carrier tracking number. - Carrier and service, order and weight, and often a QR code linking to tracking.
- Size: 4 × 6 in is the parcel standard. Start the ZPL with
^PW812and^LL1219for a 203 dpi printer; see 4 × 6 in labels for 300 dpi.
4 × 6 in shipping template
Sender, recipient, a Code 128 tracking barcode and a QR code, laid out for 812 × 1219 dots:

^XA ^CI28 ^PW812 ^LL1219 ^FO40,40^A0N,26,26^FDFROM: OpenZPL Fulfillment^FS ^FO40,74^A0N,26,26^FD125 Innovation Drive, Austin, TX 78702^FS ^FO40,120^GB732,3,3^FS ^FO40,150^A0N,30,30^FDSHIP TO:^FS ^FO40,192^A0N,58,58^FDALEX MORGAN^FS ^FO40,260^A0N,38,38^FD1234 East 6th Street, Apt 204^FS ^FO40,308^A0N,46,46^FDAUSTIN, TX 78701^FS ^FO40,380^GB732,3,3^FS ^FO40,406^A0N,26,26^FDCARRIER: GROUND SERVICE: STANDARD^FS ^FO40,446^A0N,26,26^FDTRACKING NUMBER^FS ^BY3,3,200 ^FO70,486^BCN,200,Y,N,N^FD1Z999AA10123456784^FS ^FO40,760^GB732,3,3^FS ^FO40,790^A0N,28,28^FDORDER #10482^FS ^FO40,830^A0N,28,28^FDWEIGHT 1.25 KG PKG 1 OF 1^FS ^BY2,2,10 ^FO560,780^BQN,2,6^FDQA,https://openzpl.com/track/10482^FS ^FO40,1160^A0N,22,22^FD4 x 6 in shipping label - 812 x 1219 dots at 203 dpi^FS ^XZ
Change the addresses in the ^FD fields, and the tracking number in the ^BC field. Keep the barcode's ^BY3 module width or wider so a scanner reads it; see Code 128.
Render it from your code
curl https://api.openzpl.com/v1/printers/8dpmm/labels/4x6/0/ \ --data-binary @label.zpl > label.png
Every template on this page renders through the same API. Send the ZPL as the request body and get a PNG or PDF back; see the API docs and ZPL to PDF.
Fragen
What size is a shipping label in ZPL?
4 × 6 in is the parcel standard: 812 × 1219 dots at 203 dpi (^PW812, ^LL1219) or 1219 × 1828 at 300 dpi.
Which barcode should a shipping label use?
Code 128 (^BC) for a carrier tracking number, because it encodes letters and digits compactly. Retail parcels sometimes add a GS1-128. Use a QR code only as an extra link, not as the scan barcode.