How to generate lot numbers and GS1 batch labels
- Set the production date and choose the date format: YYMMDD, YYYYMMDD, Julian (YYDDD) or ISO week (YYWW).
- Add a line or plant code, a prefix if you use one, and how many lots to number for that day.
- Enter the shelf life to calculate the expiry date, and the product GTIN if the barcode is for trade items.
- Download the label PDF with GS1-128 or GS1 DataMatrix barcodes, or export the lot list as CSV.
Lot number formats
| Pattern | Example (26 Nov 2026, line 1, batch 1) | Notes |
|---|---|---|
| YYMMDD + line + seq | 261126L101 | Readable and sorts by date |
| YYYYMMDD-line-seq | 20261126-L1-01 | Unambiguous four-digit year |
| Julian YYDDD + line + seq | 26330L101 | Short; common in food production |
| ISO week YYWW + seq | 2648L101 | For weekly batches |
Keep lot numbers short, free of spaces, and consistent. If your lots must go into GS1 barcodes, stay within 20 characters and use letters, digits and simple symbols such as - and /.
Lot and expiry in GS1 barcodes
GS1 barcodes store several pieces of data using Application Identifiers (AIs), the numbers in brackets. For batch-tracked products the usual combination is:
- (01) GTIN, 14 digits: which product it is. Check it with the GTIN check digit calculator.
- (17) expiration date, YYMMDD. Use (15) for best-before or (11) for production date instead if that is what you mark.
- (10) batch or lot number, up to 20 characters, placed last because it has variable length.
Example element string: (01)09520123456788(17)281126(10)261126L101. Encode it as GS1-128 for cartons and shipping labels, or GS1 DataMatrix for small packs and healthcare. The brackets are not encoded; they appear only in the text under the barcode.
GS1-128 is not used on items scanned at a retail checkout, so consumer packs still carry an EAN-13 or UPC-A for the point of sale. For pallets, add an SSCC label.
Frequently asked questions
What is a lot number?
A lot (or batch) number identifies a group of products made under the same conditions, usually on the same line and day. It lets you trace and, if needed, recall exactly the affected units instead of everything you have shipped.
How do I create a lot number?
A common format is the production date plus a line or plant code plus a sequence, such as 261126L101 (26 November 2026, line 1, first batch). This generator builds that pattern in YYMMDD, YYYYMMDD, Julian (YYDDD) or week (YYWW) form.
What is GS1 AI (10)?
Application Identifier (10) marks batch or lot data in GS1 barcodes such as GS1-128 and GS1 DataMatrix. The value can be up to 20 characters from the GS1 character set (letters, digits and a few symbols such as - . /). Because it is variable length, it is normally placed last in the barcode.
What is AI (17)?
AI (17) is the expiration date, always six digits in YYMMDD form. GS1 allows DD = 00 to mean the last day of the month. This tool calculates the expiry from the production date and shelf life.
Do I need a GTIN in the barcode?
For trade items scanned in the supply chain, yes: AI (01) with the 14-digit GTIN tells the scanner which product the lot belongs to. For internal tracking you can leave it out, or print the lot alone as Code 128.
Julian date or calendar date for lot codes?
Both are common. Julian codes (year + day of year, e.g. 26330) are short and popular in food manufacturing; YYMMDD is easier for people to read. Pick one format and use it consistently.