Text banner with words Food Safety coming soon in bold white and blue letters on black background.
Interviewing Sigma Foods FSQA Leader — Jan 27, 3:00 PM ET
12 min read
Last Updated
August 5, 2026

What Is a Lot Code? How to Read, Design, and Verify One

What Is a Lot Code? How to Read, Design, and Verify One

The code printed on a package is the only thing standing between recalling one shift's production and recalling a month of it. A lot code looks like a formality until the moment it decides how much product you have to pull back.

Most explanations of lot codes are written for warehouse operators or retail inventory systems. This one is written for the people who assign them.

What is a lot code?

A lot code is an identifier assigned to a quantity of product manufactured, processed, or packed under the same conditions, used to trace that product forward to customers and backward to its raw materials.

"Same conditions" is doing the work in that definition. In practice it usually means the same production line, the same shift, the same day, and the same set of ingredient lots. When any one of those changes, you are arguably making a different lot, and your lot code should reflect it.

Lot code, lot number, batch code, or date code?

These terms are used loosely and the differences matter more than people assume.

Term What it means Notes
Lot code / lot number Identifier for a defined quantity produced under uniform conditions Interchangeable in most usage
Batch code Identifier for a batch, often a single mixing or cooking vessel A lot may contain several batches
Date code Best-by, use-by, or sell-by date Quality information, not identity
Traceability lot code (TLC) A specific FSMA 204 term with defined assignment rules Not the same as a general lot code, see below

A lot code tells you which product this is. A date code tells you how long it is good for. They are frequently printed together and they answer different questions.

Where to find a lot code on a package

If you are looking at a package in your kitchen rather than designing a coding system, the code is usually near the best-by date. Common locations are the can end, the crimp seal on a pouch, the bottom or side panel of a carton, and the shoulder or base of a bottle.

There is no universal format for a general lot code. Each manufacturer designs their own, which is why an online lookup tool cannot decode a code from an arbitrary brand. If you need to know what a specific code means, contacting the manufacturer is the only reliable route.

How to read a lot code

Here is a realistic code broken down character by character. Assume a manufacturer running multiple sites and lines.

Code: B2 1470 3A

Segment Value Meaning
B2 Site and line Plant B, Line 2
147 Julian date Day 147 of the year, 27 May in a non-leap year
0 Year digit Last digit of the year
3 Shift Third shift
A Sequence First lot produced on that line, that shift

That single string tells an investigator where, when, and under what conditions the product was made. Without the key, it tells them nothing, which is why your coding key is itself a controlled document.

Julian dates explained

Julian date codes number the days of the year from 001 to 365, or 366 in a leap year. Day 032 is 1 February. Day 200 is 19 July in a non-leap year.

Two errors happen constantly on the floor. The first is transposition, where 147 gets read or entered as 174, putting the product nearly a month out. The second is the year digit, which is usually a single character and is ambiguous across decades: a code ending in 0 could be 2020 or 2030.

If your operators are reading Julian dates in a cold room at speed, print a conversion chart at the line. It costs nothing and removes a whole class of error.

Lot code vs. traceability lot code: not the same thing

This is the distinction that most content gets wrong, and getting it wrong matters if you handle anything on the Food Traceability List.

A traditional lot code identifies a lot uniquely within your own business. A traceability lot code has to identify a lot uniquely within the food system, so that every trading partner downstream is referring to the same lot when they use it.

FDA defines the 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 FSMA 204 final rule sets out when it is assigned.

A TLC is assigned at three points:

  1. When a raw agricultural commodity is initially packed
  2. On first land-based receiving of wild-caught seafood
  3. When a food is transformed

Whoever performs that action assigns the code. Everyone downstream preserves it until the next transformation event.

Two practical consequences. First, this only applies to foods on the Food Traceability List, so most manufacturers are affected for some products and not others. Second, most existing internal lot codes do not satisfy the TLC definition on their own, because a code like B2 1470 3A is unique inside your plant and meaningless outside it. Meeting the definition usually means pairing a firm-assigned code with a globally unique product identifier.

Food Safety Magazine has a useful treatment of how the traceability lot code requirements work, and our FSMA 204 guide covers the rule in full.

Compliance dates for this rule have shifted before. Check FDA directly for the current dates rather than relying on any secondary source, including this one.

How to design a lot code that works

Coding equipment vendors will tell you how to print a code. Almost nobody tells you what to put in it.

Encode what you need to segregate by. Date is non-negotiable. Line and shift are usually worth it, because they define the boundaries you would use to narrow a recall. Site matters if you run more than one plant. Product identity is often already carried by the package itself.

Do not encode what you can look up. If your production records tie a lot code to the operator, the ingredient lots, the equipment used, and the batch records, none of that needs to be in the code. The code is a key into your records, not a substitute for them.

Avoid over-encoding. Long codes get truncated by the printer, mis-keyed at receiving, and misread on the floor. Every additional character is another chance for an error that breaks the link between product and records.

Decide on human-readable, machine-readable, or both. A scannable code removes transcription error at receiving and shipping. A human-readable code is what an operator uses at a line check and what a consumer reads off a package during a complaint call. Many manufacturers carry both.

Keep the format stable. Changing your coding structure mid-year makes historical traces harder and confuses customers who have built their own systems around your format. If you must change it, document the changeover date prominently.

How big should a lot be?

This is the most consequential decision in the whole topic, and almost nobody writes about it.

The trade-off is simple. Larger lots mean fewer code changes, less operational friction, and wider recalls. Smaller lots mean more granularity, more discipline required, and narrower recalls.

Consider the same contamination event under two lot-sizing policies. A facility running one lot per production day discovers a problem traced to a specific ingredient delivery. The recall covers everything made that day: all lines, all shifts, roughly 40,000 units. A facility running one lot per line per shift discovers the same problem. The recall covers one line, one shift, roughly 7,000 units.

The contamination was identical. The difference in exposure came entirely from a decision made months earlier about where lot boundaries fall.

Sensible boundary triggers:

  • Shift change, because the crew, and often the conditions, change
  • A sanitation or CIP break, since the equipment state resets
  • A raw material lot change, which is the most important one and the most commonly skipped
  • A formulation or specification change
  • A significant process deviation followed by a restart

The raw material trigger deserves emphasis. If you change an ingredient lot mid-run without starting a new lot code, you have permanently merged two ingredient histories into one finished-product identity. A trace back from that lot now implicates both ingredient lots, and both suppliers.

Lot boundaries are captured most reliably at the moment they occur. Allera's Digital Forms let you build a line start-up and changeover check that records the boundary as it happens, including the ingredient lots being issued, rather than reconstructing it from memory at the end of the shift.

Where the boundaries fall also determines how a mock recall plays out, and the broader picture sits in our food traceability guide.

If nobody can read it, it isn't a lot code

A code that cannot be read is functionally absent, and this is the step that printing vendors skip because they sell the printer rather than the process.

Failure modes worth knowing:

  • Low contrast on flexible film, where a dark ink on a dark substrate is technically printed and practically invisible
  • Ink starvation partway through a run, producing codes that fade progressively
  • Condensation on cold-storage packs, which smears codes that were legible when applied
  • Coder drift after a changeover, printing over a seal or off the panel edge
  • Wrong date set at start-up, which produces a perfectly legible and completely incorrect code

Verification is the control. Check that the code is present, correct, and legible at line start-up, after every changeover, and at defined intervals during the run. Record the verification, and capture the actual code rather than ticking a box. A photograph in the record settles arguments that a checkmark cannot.

Date code legibility also underpins stock rotation. If the date cannot be read in the warehouse, FEFO rotation is guesswork.

A Digital Forms check with an image field for the printed code handles this well. A failure rule on the check flags the submission and creates a Corrective Action with a named owner, so an illegible code becomes a tracked item rather than a note someone meant to follow up on.

When the code is wrong

Three failures account for most incidents: the coder was set to the wrong date, a line or shift digit is incorrect, or nothing printed at all.

The response has a sequence. Stop the line. Quarantine everything produced since the last verified good check, because that is the boundary of your uncertainty. If your last verification was four hours ago, four hours of production is in scope. If it was fifteen minutes ago, fifteen minutes is.

That relationship is the practical argument for frequent verification. Check frequency directly sets the size of the retrospective hold.

Then decide disposition: re-label if the product is otherwise sound and re-labelling is feasible, hold pending investigation, or destroy. Someone with defined authority makes that call, and the decision goes in the record with the reasoning. The event should route through your corrective action plan process, because a coder that drifts once will drift again.

Lot codes vs. date codes

Worth separating clearly, since they usually appear side by side.

A lot code is identity. A date code is a quality statement. Neither substitutes for the other.

In the United States, date labels on food are overwhelmingly quality indicators rather than safety cutoffs. FSIS states in its guidance on food product dating that except for infant formula, dates are not an indicator of safety and are not required by federal law. Its Food Product Dating fact sheet covers the phrasing conventions, with "Best if Used By" recommended.

The date you print should come from your own shelf life testing, not from convention or from what a competitor does.

What the certification schemes expect

No scheme mandates a specific code format. All of them require that product can be identified and traced.

Standard What it expects What an auditor asks for
FSMA 204 Traceability lot codes and key data elements for Food Traceability List items TLC assignment records, KDEs at critical tracking events
SQF Edition 9 Product identification and traceability throughout the process A trace exercise, mass balance, code verification records
BRCGS Issue 9 Traceability, product identification, and date coding controls Forward and backward trace within the scheme's time expectation
FSSC 22000 v6 Traceability system covering identification of incoming materials and finished product Trace exercise and system documentation
USDA FSIS Lot identification for meat and poultry products Production records tied to lot identity

The primary references are the SQF Food Safety Code for Food Manufacturing (Edition 9), the BRCGS Global Standard Food Safety (Issue 9), and the FSSC 22000 Scheme Version 6, all benchmarked under the GFSI Benchmarking Requirements.

Most schemes expect a trace exercise to be completed within a defined window, commonly four hours. That window is a test of your records, not your intentions. Our SQF audit checklist and GMP in the food industry guides cover the surrounding expectations.

Keeping lot records findable when it matters

Here is the test that matters. It is nine on a Friday evening, a customer has reported a problem with lot B2 1470 3A, and someone needs every record tied to that lot. How long does that take?

Most facilities have the records. What they lack is the ability to search by lot. Production paperwork is filed by date, receiving records by supplier, and QA checks by form type. Reassembling one lot's history means pulling from three or four filing systems and hoping nothing was misfiled.

The fix is capturing lot at the point of production in a form that stays searchable afterwards. Allera's Digital Forms record lot on the submission itself, so submissions can be found by lot rather than by date, and PDF or ZIP export produces the record pack an investigator or auditor asks for. Where a customer runs the Wherefour ERP integration, lot data can populate form dropdowns so operators select rather than type, which removes the transcription errors that break traces.

Broader tooling options are covered in our food traceability software buyer's guide and the best food traceability software roundup.

The code is the cheapest insurance you have

Lot coding gets treated as a printing task and budgeted like one. It is worth remembering what the code actually buys you: the ability to say precisely which product is affected when something goes wrong, and to prove it.

Two changes deliver most of the value. Tighten your lot boundaries so a lot means one line, one shift, one set of ingredient lots. And verify the code at start-up and changeover so the boundaries you defined actually made it onto the package.

To see how lot data captured at the line stays searchable and exportable when you need it, take a look at Allera's food quality management software.

FAQs

Retention depends on the framework and the record type. FSMA sets a general baseline for records subject to the preventive controls rule, USDA FSIS has its own requirements for meat and poultry, and GFSI schemes generally expect records to be available across the audit cycle. Confirm the specific requirement for your product category and keep records at least as long as the product's shelf life plus a margin.

There is no single federal rule requiring a general lot code on all foods, but traceability requirements effectively make them necessary. FSMA 204 requires traceability lot codes for foods on the Food Traceability List, USDA FSIS requires lot identification for meat and poultry, and every GFSI-recognised scheme requires product identification and traceability.

No. A lot code identifies which product this is. A date code states how long it is expected to remain at peak quality. They are commonly printed together and answer different questions.

A traceability lot code is a specific FSMA 204 term for a code that identifies a lot uniquely across the food system rather than only within one company. It is assigned when a raw agricultural commodity is initially packed, on first land-based receiving of wild-caught seafood, or when a food is transformed, and it applies only to foods on the Food Traceability List.

Usually near the best-by or expiration date. Common locations are the can end, the crimp seal on a pouch, the bottom or side panel of a carton, and the shoulder or base of a bottle. Formats vary by manufacturer because there is no universal standard for general lot codes.

There is no universal lookup tool, because general lot codes are not standardised across manufacturers. Contacting the manufacturer directly is the only reliable route.

The exception is foods on the FDA Food Traceability List, where a traceability lot code must identify a lot uniquely across the food system rather than only within one company.

Look adjacent to the date marking first, since the two are usually printed together by the same coder. Check the can end, pouch crimp, carton base, or bottle shoulder.

If the code is smudged or missing, contact the manufacturer with the product description and purchase date. Illegible codes are a known production issue and manufacturers can often identify the lot from other packaging details.

A code like B2 1470 3A might break down as: plant B, line 2, Julian day 147, year ending in 0, third shift, first lot of that run.

Every manufacturer designs its own structure, so the same string would mean something entirely different at another facility. Without the manufacturer's key, a code cannot be decoded reliably.

The lot code is usually printed near the best-by or expiration date. Common locations are the can end, the crimp seal on a pouch, the bottom or side panel of a carton, and the shoulder or base of a bottle.

Formats vary because there is no universal standard for a general lot code. Each manufacturer designs its own structure.

author
Paddy McNamara
Co-Founder & CEO
Paddy McNamara, Author of the Allera Technologies blog.
Paddy McNamara is the Founder and CEO of Allera Technologies, helping food manufacturers modernize food safety and compliance. After nearly dying from a severe food allergy, he started Allera to reduce risk and simplify FSQA. He writes to demystify food safety regulations and shares insights on LinkedIn while connecting with FSQA professionals at conferences and Food Safety Night meetups.
Food Safety Leadership: 5 Lessons from Jill Stuber
Jill Stuber
Co-Founder, Catalyst Food Leaders
Logo with the text 'THIRTY FOOD SAFETY' in bold uppercase letters.
30-min Interviews with the Brightest Minds in FSQA
100% Free access to 20+ videos
Access now
Decorative
Enjoy free access forever!
Oops! Please enter a valid email address
Food industry leaders from Mars, Wendy’s, and Lyons Magnus featured in a food safety and quality management discussion — highlighting innovation and compliance in global food manufacturing.