What is a lot code? It is the identifier a plant prints on a product so that, if something goes wrong, it can say exactly which production run the product came from. A date code says when. Together they let a packer find a problem and tell a customer which cases to pull.
This page is for the people who put those codes on packs: plant managers, quality and packaging engineers. If you are trying to decode a code on a bottle of perfume or a jar of skincare, this is not that page; what follows is the plant floor meaning.
If you need to print codes on cases or packs and want a second opinion on the equipment, book an equipment audit and we will look at the pack, the speed and the data source.
What is a lot code?
A lot code is a number or alphanumeric string that identifies one production run, a lot, of a product. It is chosen by the manufacturer, printed on the pack or case, and recorded in the plant's records, so that every unit from that run can be traced forward to customers and back to the ingredients.
In FDA's food safety rules, a lot is "the food produced during a period of time and identified by an establishment's specific code." A plant decides how big that is: a shift, a line run, a day, a harvested block of fruit. The smaller the lot, the narrower a recall can be, which is why lot design is a business decision as much as a coding one.
FDA's traceability rule describes a traceability lot code only as "a descriptor, often alphanumeric," that uniquely identifies the lot within the records of the firm that assigned it, and FDA says a distributor should not change the code it receives. Some customers and industry bodies specify a format, and we cover those below.
What is the difference between a lot code, a batch code and a date code?
On a case label, a lot code and a batch code are the same thing: GS1 treats them as one field, AI (10) "Batch or Lot Number," the identifier of one production run. A date code is the date printed on the pack, such as a best before, use by, packed on or expiry date. A date and a lot can be printed together in one line.
Use whichever word your customers' paperwork uses. Date codes come in several kinds:
- Packed on date. The day the product was packed.
- Best before or best if used by. A quality date, set by the manufacturer.
- Use by or expiry date. The last date recommended for use. USDA describes "use by" as a peak quality date and not a safety date, except on infant formula.
- Closed or coded date. A code that stands for a date and time of production, readable by the manufacturer and not by the shopper.
USDA's Food Safety and Inspection Service describes closed dating on its Food Product Dating page as "a code that consists of a series of letters and/or numbers applied by manufacturers to identify the date and time of production." It says can codes, one type of closed date, let manufacturers rotate their stock and locate their products in the event of a recall.
What goes into a lot code?
A lot code usually combines a few elements: the plant or line, the date or day of the year, and a sequence or shift. The code should be unique, short enough to print legibly at line speed, and built so that one lot never spans a date boundary the recall would need to separate.
Common ingredients, which a plant mixes to suit itself:
- Plant or site identifier. Tells you which facility.
- Line or packing shed. Tells you which line.
- Date, often a day of the year. Ties the lot to a day.
- Shift or run number. Separates runs within a day.
- Field, block or supplier reference. For raw products, where it came from.
Two points from industry guidance are worth checking before you design a format. In a GS1-128 barcode the batch or lot field is AI (10), and GS1 US's case code guidance gives it as "a variable length number consisting of 1-20 characters," drawn from the characters the GS1 General Specifications allow. And the Produce Traceability Initiative (PTI) recommends that shed packed product get a lot number that is unique to the packing facility and does not cross a date boundary; where a packer lets a lot cross one, PTI says to encode a pack date or best sell by date after the lot number in the barcode. Our PTI guide sets out the lot code rules that catch packers out.
Keep the format plain, so a night shift operator can type it correctly.
What do regulators and retailers expect from a lot code?
Expectations come from three places: FDA's Food Traceability Rule for certain foods, retailers such as Walmart that require lot and date data from suppliers, and industry standards such as GS1. None of them is a general law that every product must carry a printed lot code, so check which apply to you.
FDA. The FDA Food Traceability Rule requires firms that manufacture, process, pack or hold foods on the Food Traceability List to keep records that include a traceability lot code, and to assign one when they initially pack, transform or first receive from a fishing vessel a listed food. FDA's rule page defines a traceability lot code as a descriptor, often alphanumeric, used to uniquely identify a traceability lot within the records of the firm that assigned it. The same page reports that FDA proposed extending the compliance date by 30 months to July 20, 2028, and that Congress directed FDA not to enforce the rule before that date. FDA's FAQ on the rule says the rule does not require the code on food labeling or packaging; it can travel on a bill of lading, an advance ship notice or a QR code, and PTI's FSMA 204 Implementation Guidance says the same. The rule covers foods on the list and foods that contain them as an ingredient in the same form. Many common fruits are not on the list (FDA's list excludes citrus, for example), so confirm yours.
Date labels. The USDA's Food Product Dating page says that, except for infant formula, product dating is not required by federal regulations. It also notes that USDA requires a "pack date" on poultry products and on thermally processed, commercially sterile products, and that cans must exhibit a code or the date of canning. A date on your pack may also be required by a customer, a state or a contract, so ask.
Retailers. Walmart's supplier food traceability page says it expects food suppliers to share lot or batch codes, date codes and the source where the lot or batch code was generated. It also says pallets containing food must be labeled with an SSCC-18 barcode, cases containing food with barcodes that can transmit traceability data, such as GS1-128, and that products on the FDA list were expected to meet those requirements by August 1, 2025. Other retailers set their own rules, and their supplier manual governs.
Industry standards. GS1 US's case code labeling guidance is the reference for the GS1-128 case label. Our guide to GS1-128 and SSCC pallet labels explains the barcode side.
We are an equipment supplier, not a regulator and not your legal advisor. Your quality or regulatory team and your customer's supplier manual decide what is required.
How are lot codes and date codes printed on cases and packs?
Lot and date codes are printed directly onto the pack by an inline coder, or onto a label that is applied to the pack. The main direct methods are thermal inkjet, continuous inkjet, thermal transfer overprinting on film and hot foil. The right one depends on the surface, the speed and how far the printhead can sit from the product.
- Thermal inkjet. A sealed cartridge fires ink at close range. Well suited to dates and lots on cases, cartons, trays and bags, and every cartridge change brings a new printhead. Marapack supplies Titan printers under its own label with inks under our own part numbers, described on our coding and marking equipment hub.
- Continuous inkjet. Prints from further away and at higher line speeds, and it has preventive maintenance components to replace. We do not sell it, and our thermal versus continuous inkjet page says when it is the right answer.
- Thermal transfer overprinting. A printhead prints through a ribbon onto flexible film, on a coder built into or mounted on the packaging machine. We can supply it through the Altech distributor price list.
- Hot foil coding. Hot foil printing units for short codes are also on the Altech distributor price list.
- Printed label. A label printed and applied in line, covered next.
Whichever you use, three things decide whether the code is still readable an hour later: the substrate (which decides the ink), how consistently the pack is presented to the head, and a reliable trigger. Test on your actual pack.
Should you print the code directly or apply a label?
Print the code directly when the only variable data is a date, lot, batch or shift and the surface takes a clean mark. Apply a label when the data includes a barcode that must scan to a stated grade, when the surface will not take a good mark, or when a customer specification requires a label.
The deciding question is who reads the code. A person or a plant scanner reading a date and lot is well served by a direct code. A retailer's receiving scanner reading a GS1-128 case barcode is a different job, and GS1 US's case code guidance states that white labels are proven to work best, with direct printing onto corrugate having been known to cause readability issues. That is the case for putting produce case labels and pallet labels on a label, from a print and apply system. Our print and apply labeling systems cover that route, and the PTI labeling systems page covers the produce case label.
Some plants need both: a coder on the retail pack and a labeler on the case.
How do you keep the lot code accurate on a running line?
A lot code is accurate when the printer changes at the right moment and every pack carries the lot it was made in. That depends on where the data comes from, how the change is made and who checks it, so decide those three things before choosing equipment.
- Where the data comes from. A date typed in at shift start is a different system from a date pulled from a line controller or an ERP. Pick one on purpose.
- How a lot change happens. Who changes it, when, and what happens to the packs already in the pipeline between the printer and the pallet.
- Who checks. A first article check at each change, and a periodic check during the run, costs seconds and prevents a mis-coded lot.
Where we can help is the equipment: which coder, which ink, where it mounts, and how the trigger and data connect. We cannot tell you what your regulator wants, only what the equipment can do.
Frequently asked questions
What is a lot code on food packaging? It is the identifier a manufacturer assigns to one production run and prints on the pack, so the run can be traced if a problem is found. Under FDA's traceability rule it must uniquely identify the lot within the records of the firm that assigned it, and a GS1 barcode allows up to 20 characters for it.
What is the difference between a lot number and a batch number? For labeling purposes, none: GS1 treats them as one field, AI (10) "Batch or Lot Number," and both identify one production run. Use whichever word your customers and regulators use.
What is a date code? A date code is a printed date such as a packed on, best before, use by or expiry date. A coded date is a manufacturer's code that stands for a production date and time, used for tracking and stock rotation.
Does every product need a lot code? Not by a single universal rule. FDA's traceability rule requires traceability lot codes in the records kept for foods on its list, though not on the label. Retailers and customers often ask for lot and date data, so check your customer's requirements.
Is a date required on food packaging? USDA's Food Product Dating page says that, except for infant formula, product dating is not required by federal regulations, although USDA requires a pack date on poultry and on thermally processed, commercially sterile products. Customers, states and contracts may also require one, so confirm before you decide.
How long can a GS1 lot number be? Up to 20 characters. The batch or lot field in a GS1-128 barcode is AI (10), which GS1 US's case code guidance gives as 1 to 20 characters, and PTI lists characters to avoid in it. Our PTI guide covers the produce case label rules.
Can a thermal inkjet printer print a lot code? Yes. Thermal inkjet prints dates and lot codes on cases, cartons, trays and bags that pass within a few millimeters of the printhead. Barcodes held to a stated grade are usually safer on a printed label.
What if I run continuous inkjet today? A working, maintained continuous inkjet printer is not a problem to solve. If it is costing more than it should, our CIJ printer replacement guide covers when to switch and when to keep it.
Can you help specify the coder? Yes. We look at the pack, the substrate, the speed and the data source, and tell you which coder or label route suits, including when the answer is a technology we do not sell.
Get the code onto the pack and keep it readable
Knowing what a lot code should say is the easy half. The harder half is a mark that survives the line, the cold room and the pallet. We will walk the line with you, look at the substrate and the data source, and tell you whether you need a coder, a label or both. Request an equipment audit, or call 253-709-5566.
