GS1 pallet label
Pallets from your production line, as ZPL for industrial printers
- Template
- TXT
- Export as
- TXT, PDF, DOCX, ODT, HTML
- Carbone
- 5.0+
Generate GS1 pallet labels from your software
Food and industrial producers put a GS1 logistic label on every pallet that leaves the line, as set by the GS1 Logistic Label Guideline: the SSCC identifies the pallet, and the barcodes carry the product, the quantity, the batch and the date, so the wholesaler receives the pallet with one scan and keeps track of each batch. In Germany, the SSCC is also called NVE (Nummer der Versandeinheit). Your production or warehouse software sends the pallets to the Carbone API as JSON and gets back ZPL for a 6-inch industrial thermal printer at 300 dpi, one 6x8 label per pallet. In this example, the cheese maker Northwind Traders labels a pallet of Gouda wheels sold by weight and a pallet of Gouda slices.
GS1 pallet label layout
The label follows the GS1 order: free text at the top, the data titles in the middle, the barcodes at the bottom.
| Block | Field | AI | Format |
|---|---|---|---|
| Free text | Supplier name and address, product description | None | Text |
| Data titles | SSCC, CONTENT, COUNT, NET WEIGHT (kg), BEST BEFORE, BATCH/LOT: the barcode data in characters at least 7 mm high, for people |
None | Text, without AIs |
| Barcode 1 | CONTENT: the GTIN-14 of the trade items on the pallet |
(02) |
14 digits |
| Barcode 1 | NET WEIGHT: the total net weight in kg, for items sold by weight |
(3102) |
6 digits, 2 decimals |
| Barcode 1 | COUNT: the number of trade items |
(37) |
1 to 8 digits |
| Barcode 2 | BEST BEFORE: the best before date |
(15) |
YYMMDD |
| Barcode 2 | BATCH/LOT: the batch number |
(10) |
Up to 20 characters |
| Barcode 3 | SSCC: the serial number of the pallet, always the lowest barcode |
(00) |
18 digits |
The barcodes have 0.58 mm narrow bars and are 32 mm high, in the GS1 range for logistic labels. In each barcode, the fixed-length AIs come first and the variable-length AI last, so none needs an FNC1 separator. For the 4x6 label that US retailers require on each carton, with the ship-to and carrier zones, see the UCC-128 carton label example.
GS1 pallet label example
Template
{#zpl($text) = $text:replace('_', '_5F'):replace('^', '_5E'):replace('~', '_7E')}{d.pallets[i]}^XA
^CI28
^PW1829^LL2438
^FO84,48^A0N,84,84^FH^FD{$zpl(d.supplier.name)}^FS
^FO84,148^A0N,44,44^FH^FD{$zpl(d.supplier.street)}^FS
^FO84,200^A0N,44,44^FH^FD{d.supplier.zip} {$zpl(d.supplier.city)}, {$zpl(d.supplier.country)}^FS
^FO84,272^A0N,56,56^FH^FD{$zpl(d.pallets[i].description)}^FS
^FO0,356^GB1829,5,5^FS
^FO84,380^A0N,36,36^FDSSCC^FS
^FO84,426^A0N,92,92^FD{d.pallets[i].sscc}^FS
^FO1040,380^A0N,36,36^FDCOUNT^FS
^FO1040,426^A0N,92,92^FD{d.pallets[i].count}^FS
^FO84,550^A0N,36,36^FDCONTENT^FS
^FO84,596^A0N,92,92^FD{d.pallets[i].gtin}^FS
{d.pallets[i].netWeight:ifNEM:showBegin}^FO1040,550^A0N,36,36^FDNET WEIGHT (kg)^FS
^FO1040,596^A0N,92,92^FD{d.pallets[i].netWeight:formatN(2)}^FS
{d.pallets[i].netWeight:showEnd}{d.pallets[i].bestBefore:ifNEM:showBegin}^FO84,720^A0N,36,36^FDBEST BEFORE (DD.MM.YY)^FS
^FO84,766^A0N,92,92^FD{d.pallets[i].bestBefore:formatD('DD.MM.YY')}^FS
{d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}^FO1040,720^A0N,36,36^FDBATCH/LOT^FS
^FO1040,766^A0N,92,92^FH^FD{$zpl(d.pallets[i].batch)}^FS
{d.pallets[i].batch:showEnd}^FO0,884^GB1829,5,5^FS
^FO84,916^BY7^BCN,384,N,N,N,D^FD(02){d.pallets[i].gtin}{d.pallets[i].netWeight:ifNEM:showBegin}(3102){d.pallets[i].netWeight:mul(100):round(0):padl(6, '0')}{d.pallets[i].netWeight:showEnd}(37){d.pallets[i].count}^FS
^FO84,1318^A0N,50,50^FD(02){d.pallets[i].gtin}{d.pallets[i].netWeight:ifNEM:showBegin}(3102){d.pallets[i].netWeight:mul(100):round(0):padl(6, '0')}{d.pallets[i].netWeight:showEnd}(37){d.pallets[i].count}^FS
{d.pallets[i].batch:ifNEM:or(.bestBefore):ifNEM:showBegin}^FO84,1408^BY7^BCN,384,N,N,N,D^FH^FD{d.pallets[i].bestBefore:ifNEM:showBegin}(15){d.pallets[i].bestBefore:formatD('YYMMDD')}{d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}(10){$zpl(d.pallets[i].batch)}{d.pallets[i].batch:showEnd}^FS
^FO84,1810^A0N,50,50^FH^FD{d.pallets[i].bestBefore:ifNEM:showBegin}(15){d.pallets[i].bestBefore:formatD('YYMMDD')}{d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}(10){$zpl(d.pallets[i].batch)}{d.pallets[i].batch:showEnd}^FS
{d.pallets[i].batch:showEnd}^FO84,1900^BY7^BCN,384,N,N,N,D^FD(00){d.pallets[i].sscc}^FS
^FO84,2302^A0N,50,50^FD(00){d.pallets[i].sscc}^FS
^PQ2
^XZ
{d.pallets[i+1]}
JSON data
{
"supplier": { "name": "Northwind Traders B.V.", "street": "Kaasmarkt 12", "city": "Purmerend", "zip": "1441 BW", "country": "Netherlands" },
"pallets": [
{ "sscc": "187193460003182054", "description": "Aged Gouda 48+, wheels of about 12 kg", "gtin": "98719346005123", "count": 50, "netWeight": 604.35, "bestBefore": "2027-05-14", "batch": "G261104" },
{ "sscc": "187193460003182061", "description": "Gouda slices, cases of 12 x 150 g", "gtin": "18719346007312", "count": 84, "bestBefore": "2027-01-20", "batch": "S261111" }
]
}
Generated ZPL labels
^XA
^CI28
^PW1829^LL2438
^FO84,48^A0N,84,84^FH^FDNorthwind Traders B.V.^FS
^FO84,148^A0N,44,44^FH^FDKaasmarkt 12^FS
^FO84,200^A0N,44,44^FH^FD1441 BW Purmerend, Netherlands^FS
^FO84,272^A0N,56,56^FH^FDAged Gouda 48+, wheels of about 12 kg^FS
^FO0,356^GB1829,5,5^FS
^FO84,380^A0N,36,36^FDSSCC^FS
^FO84,426^A0N,92,92^FD187193460003182054^FS
^FO1040,380^A0N,36,36^FDCOUNT^FS
^FO1040,426^A0N,92,92^FD50^FS
^FO84,550^A0N,36,36^FDCONTENT^FS
^FO84,596^A0N,92,92^FD98719346005123^FS
^FO1040,550^A0N,36,36^FDNET WEIGHT (kg)^FS
^FO1040,596^A0N,92,92^FD604.35^FS
^FO84,720^A0N,36,36^FDBEST BEFORE (DD.MM.YY)^FS
^FO84,766^A0N,92,92^FD14.05.27^FS
^FO1040,720^A0N,36,36^FDBATCH/LOT^FS
^FO1040,766^A0N,92,92^FH^FDG261104^FS
^FO0,884^GB1829,5,5^FS
^FO84,916^BY7^BCN,384,N,N,N,D^FD(02)98719346005123(3102)060435(37)50^FS
^FO84,1318^A0N,50,50^FD(02)98719346005123(3102)060435(37)50^FS
^FO84,1408^BY7^BCN,384,N,N,N,D^FH^FD(15)270514(10)G261104^FS
^FO84,1810^A0N,50,50^FH^FD(15)270514(10)G261104^FS
^FO84,1900^BY7^BCN,384,N,N,N,D^FD(00)187193460003182054^FS
^FO84,2302^A0N,50,50^FD(00)187193460003182054^FS
^PQ2
^XZ
^XA
^CI28
^PW1829^LL2438
^FO84,48^A0N,84,84^FH^FDNorthwind Traders B.V.^FS
^FO84,148^A0N,44,44^FH^FDKaasmarkt 12^FS
^FO84,200^A0N,44,44^FH^FD1441 BW Purmerend, Netherlands^FS
^FO84,272^A0N,56,56^FH^FDGouda slices, cases of 12 x 150 g^FS
^FO0,356^GB1829,5,5^FS
^FO84,380^A0N,36,36^FDSSCC^FS
^FO84,426^A0N,92,92^FD187193460003182061^FS
^FO1040,380^A0N,36,36^FDCOUNT^FS
^FO1040,426^A0N,92,92^FD84^FS
^FO84,550^A0N,36,36^FDCONTENT^FS
^FO84,596^A0N,92,92^FD18719346007312^FS
^FO84,720^A0N,36,36^FDBEST BEFORE (DD.MM.YY)^FS
^FO84,766^A0N,92,92^FD20.01.27^FS
^FO1040,720^A0N,36,36^FDBATCH/LOT^FS
^FO1040,766^A0N,92,92^FH^FDS261111^FS
^FO0,884^GB1829,5,5^FS
^FO84,916^BY7^BCN,384,N,N,N,D^FD(02)18719346007312(37)84^FS
^FO84,1318^A0N,50,50^FD(02)18719346007312(37)84^FS
^FO84,1408^BY7^BCN,384,N,N,N,D^FH^FD(15)270120(10)S261111^FS
^FO84,1810^A0N,50,50^FH^FD(15)270120(10)S261111^FS
^FO84,1900^BY7^BCN,384,N,N,N,D^FD(00)187193460003182061^FS
^FO84,2302^A0N,50,50^FD(00)187193460003182061^FS
^PQ2
^XZ
How to create a GS1 pallet label
1. Print one label per pallet
The label is a loop on d.pallets: {d.pallets[i]} before ^XA and {d.pallets[i+1]} after ^XZ repeat the whole label for each pallet. ^PW1829^LL2438 sets a 6x8 label at 300 dpi, 12 dots per mm, and ^PQ2 prints each label twice, for two sides of the pallet, as GS1 recommends.
2. Encode the net weight
(3102) holds the weight in kg with 2 implied decimals, on 6 digits. {d.pallets[i].netWeight:mul(100):round(0):padl(6, '0')} turns 604.35 into 060435, and the data title prints {d.pallets[i].netWeight:formatN(2)}, so 604.35. The weight only applies to items sold by weight, whose GTIN starts with 9. The slices have a fixed weight, so a conditional block on netWeight removes (3102) and the NET WEIGHT field from their label.
3. Build the date and batch barcode
:formatD('YYMMDD') writes the date in the GS1 format: 2027-05-14 becomes (15)270514, and :formatD('DD.MM.YY') prints 14.05.27 under its data title. Inside the barcode, each AI is its own block, so a pallet without a date gets (10) alone and a pallet without a batch gets (15) alone:
{d.pallets[i].bestBefore:ifNEM:showBegin}(15){d.pallets[i].bestBefore:formatD('YYMMDD')}{d.pallets[i].bestBefore:showEnd}
{d.pallets[i].batch:ifNEM:or(.bestBefore):ifNEM:showBegin} removes the whole barcode when the pallet has neither.
4. Write the barcodes and their text lines
^BY7^BCN,384,N,N,N,D sets narrow bars of 7 dots and a height of 384 dots. Mode D starts each barcode with FNC1 and removes the parentheses: scanners read ]C1 then 029871934600512331020604353750. Each barcode and its text line start at the same position, ^FO84, so they stay aligned whatever the barcode width. The alias on the first line escapes ^, ~ and _ in the names and the batch, as in the ZPL labels section of the TXT templates page.
Related Examples
Trusted by 800+ paid customers in 40+ countries














