Warehouse bin location label in ZPL
A warehouse location label in ZPL shows the bin or rack code in large text with a Code 128 barcode of the same code, so a scanner can confirm the slot. Copy the 4 × 2 in template below and change the location.
已更新 2026-11-01 · Renders made with the OpenZPL engine
在查看器中打开What goes on a location label
- The location code in large text — aisle, bay and level — readable from the aisle.
- A Code 128 barcode (
^BC) of the same code, so a handheld scanner confirms the slot on put-away and picking. - Size: 4 × 2 in is common for rack and shelf edges; a pallet or bulk location can go bigger, see 100 × 100 mm.
4 × 2 in location template
A large location code and a Code 128 barcode of it, laid out for 812 × 406 dots:

^XA ^CI28 ^PW812 ^LL406 ^FO30,24^A0N,28,28^FDWAREHOUSE LOCATION^FS ^FO30,70^A0N,100,100^FDA-12-3^FS ^FO580,44^A0N,34,34^FDAISLE A^FS ^FO580,88^A0N,34,34^FDBAY 12^FS ^FO580,132^A0N,34,34^FDLEVEL 3^FS ^FO30,200^GB752,2,2^FS ^BY3,2,120 ^FO40,230^BCN,120,Y,N,N^FDA-12-3^FS ^XZ
Keep the text code and the barcode data identical so what a person reads and what a scanner reads agree. For long rack codes, lower the font size or widen the label.
Render it from your code
curl https://api.openzpl.com/v1/printers/8dpmm/labels/4x2/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.
问题
What barcode is best for warehouse location labels?
Code 128 (^BC): it encodes the letters and digits of a location code compactly and scans reliably on handhelds. Use Data Matrix (^BX) where the label is tiny or must be read at any angle.
How do I make the location code bigger?
Raise the font height in ^A0N,120,120. On a 4 × 2 in label a 120-dot font fills most of the width for a short code; keep it inside ^PW812.