An opened jar of store-bought mayonnaise keeps its quality for about 2 months in the fridge. An unopened jar keeps 3 to 6 months in the pantry. Homemade mayonnaise lasts only 3 to 4 days in the fridge, and no mayonnaise freezes well. Those are the storage times in the USDA FoodKeeper database. The bigger risk is not the jar itself but everything you mix it into: a tuna salad or potato salad follows much stricter rules.
Mayonnaise is one of those foods everyone has an opinion about. Some people keep it in the cupboard after opening, others throw out the potato salad after twenty minutes in the sun. The official guidance sits in between, and it makes a clear distinction that most kitchens miss: the jar and the dish are two different things.
Unopened: 3 to 6 months in the pantry. Opened: 2 months in the fridge. Homemade: 3 to 4 days in the fridge. Freezer: not recommended. Keep your fridge at 40°F (4°C) or below. Salads and sandwiches made with mayonnaise are perishable food: back in the fridge within 2 hours, or within 1 hour when it is hotter than 90°F (32°C), and eaten within 3 to 4 days (potato salad 3 to 5 days).
How long mayonnaise lasts
The USDA FoodKeeper, the storage database behind the official US food safety advice, lists commercial mayonnaise with two clear windows. Unopened, a jar keeps 3 to 6 months in the pantry, counted from the day you buy it. Once opened, it keeps 2 months in the refrigerator. Always check the best-by date on the jar as well: it tells you how long the manufacturer expects the product to stay at its best. Our page on best before and use by dates explains what those labels do and do not mean.
Refrigerate the jar at 40°F (4°C) or below. That is the temperature the FDA recommends for every home refrigerator, and the only way to know your fridge really reaches it is an appliance thermometer. We compared a few in the best refrigerator thermometers.
The jar and the dish follow different rules
This is where most mayonnaise mistakes happen. A sealed, shelf-stable jar is a stable product. The moment mayonnaise is spread on a chicken sandwich or stirred through egg, pasta or potatoes, it becomes part of a perishable dish, and perishable food follows the two-hour rule.
The USDA Food Safety and Inspection Service explains why: between 40°F and 140°F, the “Danger Zone”, bacteria can double in number in as little as 20 minutes. Food should never stay out of the refrigerator for more than 2 hours, or more than 1 hour when the temperature is above 90°F (32°C). At a summer picnic, that one hour comes quickly.
Opened store-bought jar
2 months of good quality. Put it back in the fridge right after use, as the label says.
Salads and sandwiches with mayo
3 to 4 days in the fridge (potato salad 3 to 5). Out of the fridge for 2 hours at most, 1 hour above 90°F.
Homemade mayonnaise
3 to 4 days in the fridge. Make small batches and use pasteurized eggs.
“Mayonnaise is what makes potato salad dangerous.”
The official advice points at time and temperature, not at the mayonnaise. The same two-hour rule applies to every perishable dish, whether it contains mayonnaise or not. A potato salad, chicken salad or egg salad is risky because it holds cooked, moist ingredients that were handled and then left in the Danger Zone. Keep it cold, serve it cold, and put it back in the fridge in time.
Mayonnaise shelf life at a glance
| What | Where | How long | Notes |
|---|---|---|---|
| Store-bought, unopened | Pantry | 3 to 6 months | Counted from the day you buy it. Check the best-by date on the jar too. |
| Store-bought, opened | Fridge, 40°F (4°C) or below | 2 months | Refrigerate for quality, as the label says. Lid closed, clean spoon. |
| Homemade mayonnaise or aioli | Fridge | 3 to 4 days | Use pasteurized eggs. Keep sealed and cold. |
| Egg, chicken, ham or tuna salad | Fridge, airtight container | 3 to 4 days | Freezing not recommended. |
| Potato salad | Fridge, airtight container | 3 to 5 days | Freezing not recommended. |
| Any dish with mayonnaise | Room temperature | 2 hours max | 1 hour when it is above 90°F (32°C). Then back in the fridge or discard. |
| Any mayonnaise | Freezer | Not recommended | The emulsion separates and looks curdled after thawing. |
Source: USDA FoodKeeper (storage times), USDA FSIS and FDA (2-hour rule, fridge temperature). For 50+ other foods, see our food storage chart.
Homemade mayonnaise: small batches, pasteurized eggs
Homemade mayonnaise is traditionally made with raw egg yolks, and that changes everything. The FoodKeeper gives homemade aioli (garlic mayonnaise) just 3 to 4 days in the refrigerator, and the same short window is the sensible limit for any homemade mayonnaise.
For the eggs themselves, the FDA’s egg safety advice is clear: for recipes where the eggs stay raw or undercooked in the finished dish, use shell eggs that have been pasteurized, or pasteurized egg products. Raw eggs can carry Salmonella, and a cold emulsion never gets hot enough to change that. Read more about keeping the eggs themselves fresh in how to store eggs properly.
Why is the jar from the store so much more forgiving? Commercially made mayonnaise is acidified, which NC State University food safety researcher Ben Chapman calls “really low risk on its own.” Many home recipes skip the acid. His advice for homemade: use pasteurized egg products, pick a recipe with vinegar or lemon juice, and still keep it in the fridge, because a home recipe may not contain enough acid.
Practical rules for homemade mayonnaise: make only what you will use within a few days, spoon it into a clean jar with a lid, label it with the date, and keep it in the coldest part of the fridge, not in the door.
Why you should not freeze mayonnaise
You can put a jar in the freezer, but you will not like what comes out. The USDA FSIS page on freezing and food safety names mayonnaise as one of the foods that simply do not freeze well, next to cream sauce and lettuce. The reason is its structure: mayonnaise is an emulsion, tiny droplets of oil held in place by egg yolk and acid. Ice crystals break that structure, and after thawing the emulsion separates and looks curdled.
The same goes for dishes that are held together by mayonnaise. The FoodKeeper advises against freezing egg salad, chicken salad, ham salad, tuna salad and potato salad. If you want to prepare food ahead, freeze the cooked chicken plain, thaw it in the fridge and mix in the mayonnaise after thawing. For what freezing does and does not do to bacteria, see does freezing kill bacteria.
The jar is the easy part. The tuna salad on the picnic table is where the clock really starts.
How to tell mayonnaise has gone bad
Past its quality window, mayonnaise usually tells you. Throw the jar away if you notice any of these:
- A sour or off smell instead of the mild, slightly tangy smell of fresh mayonnaise.
- Discoloration that was not there when you opened the jar, often first around the rim and under the lid.
- Mold of any color, anywhere in the jar. Do not scoop it off: discard the whole jar.
- A layer of liquid or a split texture that does not come back together when stirred.
- Crumbs or bits of other food in the jar, combined with any of the signs above.
Smell and looks are useful for judging quality, but they do not prove that a dish is safe. A salad that sat in the sun for hours can look and smell perfectly normal. When a mayonnaise dish has been out too long, the USDA advice is simple: when in doubt, throw it out. More about what makes food spoil in why food goes bad.
Five rules for mayonnaise that stays good
A knife that just touched bread, meat or vegetables brings crumbs and moisture into the jar. Use a clean utensil every time, or choose a squeeze bottle.
An opened jar keeps its 2-month quality window only when it goes back to 40°F (4°C) or below. Do not leave it on the table for the whole meal.
A closed jar keeps out fridge odors and stops the surface from drying out and discoloring.
Take salads out of the fridge at the last moment. At a picnic or buffet, set the bowl on ice and count 2 hours, or 1 hour above 90°F (32°C).
Homemade mayonnaise has only 3 to 4 days. A date on the lid removes the guesswork.
Questions people actually ask
Opened store-bought mayonnaise keeps its quality for 2 months in the refrigerator, according to the USDA FoodKeeper. Keep the lid closed, use a clean spoon, and keep your fridge at 40°F (4°C) or below.
Follow the label and refrigerate it. The USDA FoodKeeper notes that shelf-stable commercial mayonnaise is safe at room temperature after opening and that the refrigeration advice on the label is about quality, not safety. In the fridge an opened jar keeps its quality for 2 months. Homemade mayonnaise and any food made with mayonnaise must always be refrigerated.
No more than 2 hours, or 1 hour when the temperature is above 90°F (32°C). That is the USDA and FDA rule for all perishable food. In the fridge, tuna, egg, chicken and ham salad keep 3 to 4 days and potato salad 3 to 5 days.
About 3 to 4 days in the refrigerator, the time the USDA FoodKeeper gives for homemade aioli. Use pasteurized eggs, as the FDA advises for any recipe with raw eggs, make small batches and keep them sealed and cold.
It is not recommended. The USDA lists mayonnaise among the foods that do not freeze well: the emulsion separates and looks curdled after thawing. Salads made with mayonnaise should not be frozen either.
3 to 6 months in the pantry from the day you buy it, according to the USDA FoodKeeper. Store it somewhere cool and dry, and check the best-by date on the jar.



