Mayonnaise made with raw eggs is safer than most people assume, primarily because the acid from vinegar or lemon juice creates an environment that is hostile to foodborne pathogens like Salmonella. Commercial mayonnaise goes a step further by using pasteurized eggs, making store-bought jars one of the least risky condiments in your refrigerator. But even homemade versions, mixed from raw shell eggs, benefit from a surprisingly effective set of chemical defenses that have kept this condiment in kitchens for centuries.
The Acid Does Most of the Heavy Lifting
The single biggest reason mayonnaise resists bacterial growth is its pH. Vinegar and lemon juice drop the acidity of the finished product well below the threshold where Salmonella and other common pathogens can thrive. Research has shown that as long as the pH stays below about 4.2, Salmonella culturability is severely limited.1PubMed. The effects of varied food acid ratios and egg components on Salmonella Typhimurium culturability from raw egg-based sauces Most properly made mayonnaise lands somewhere in the range of 3.6 to 4.1, safely inside that zone.
A large historical review of mayonnaise safety in the United States found that acetic acid, the active compound in vinegar, is the most effective natural preservative at killing pathogenic bacteria in these products. The review noted that the most important factor in destroying pathogens is pH adjusted with acetic acid, followed by the concentration of acetic acid dissolved in the water phase of the emulsion. Commercially manufactured dressings and sauces typically target a pH at or below 4.4, which sits below the point where foodborne pathogens can grow in the presence of acetic acid.2PubMed. Microbiological safety of mayonnaise, salad dressings, and sauces produced in the United States: a review An earlier review of mayonnaise microbiology reached the same conclusion: the major preservative effect comes from acetic acid content, with salt and sugar playing only a minor supporting role.3Journal of Food Protection. Microbiology of Mayonnaise and Salad Dressing: A Review
This is worth emphasizing because many home cooks worry they need to add extra salt or sugar to make raw-egg mayonnaise safe. Those ingredients contribute to flavor and texture, but from a food-safety standpoint, the acid is doing the real work.
Lemon Juice Versus Vinegar
Not all acids perform identically. Studies comparing vinegar-based and lemon-juice-based mayonnaise have found that Salmonella survives longer in vinegar-made mayo than in versions made with lemon juice when both are stored in the refrigerator.4Journal of Food Protection. Survival of Salmonella in Home-Style Mayonnaise and Acid Solutions as Affected by Acidulant Type and Preservatives That may sound counterintuitive since vinegar is typically the more traditional choice, but lemon juice contains citric acid alongside other organic acids that appear to create a slightly more lethal cocktail for bacteria at refrigerator temperatures. In acid solutions tested separately from mayonnaise, however, the two Salmonella populations did not differ significantly, suggesting the effect has something to do with how lemon juice interacts with the full emulsion rather than raw acid strength alone.
For home cooks, the practical takeaway is that using lemon juice or a combination of lemon juice and vinegar gives you a small additional margin of safety compared to vinegar alone. Either way, the critical variable is making sure enough acid goes in. A recipe that skimps on vinegar or lemon juice to produce a milder flavor is also producing a less hostile environment for any bacteria that might be present.
Temperature Makes a Bigger Difference Than You Would Expect
Here is something that surprises most people: mayonnaise stored at room temperature actually kills bacteria faster than mayonnaise kept in the fridge. Research on Salmonella Typhimurium in mayonnaise found that at room temperature (around 25°C), bacterial energy production dropped so rapidly that within 24 hours it was indistinguishable from a dead control sample.5PubMed. Acidification and extended storage at room temperature of mayonnaise reduce Salmonella Typhimurium virulence and viability At refrigerator temperature, the same acid environment still kills bacteria, but the process takes much longer.
A similar pattern holds for E. coli O157:H7. In one study, E. coli populations in real mayonnaise stored at 30°C fell to undetectable levels within two days. At 20°C, viable cells disappeared within a day at lower starting contamination levels and within a week at higher ones. At 5°C, the bacteria persisted considerably longer.6PubMed Central. Death of enterohemorrhagic Escherichia coli O157:H7 in real mayonnaise and reduced-calorie mayonnaise dressing as influenced by initial population and storage temperature
This does not mean you should leave your mayonnaise on the counter indefinitely. Fat can go rancid, and once mayonnaise is mixed into other foods (like chicken salad), those foods introduce their own moisture and nutrients that bacteria can exploit. But it does explain a quirk of traditional French and Mediterranean kitchens, where freshly made aioli was often served at room temperature within a few hours without incident. The acid was already working, and warmth was accelerating the kill.
How Rare Is Salmonella in Eggs to Begin With?
Part of the reason raw-egg mayonnaise rarely causes illness is that the starting risk is lower than most people imagine. A study of 201 retail egg samples found Salmonella in none of them.7PubMed Central. Quantitative risk assessment of foodborne Salmonella illness by estimating cooking effect on eggs from retail markets Another analysis of over 400 eggs from both conventional and cage-free production systems detected Salmonella in just two samples, roughly 1% of the cage-free batch, and zero among the conventional eggs.8PubMed Central. Prevalence of Salmonella in Eggs from Conventional and Alternative Production Systems and the Role of Consumers in Reducing Household Contamination Older estimates from USDA data have generally placed the odds of encountering a contaminated egg at somewhere around 1 in 20,000, though this varies by country and flock management.
When contamination does occur, the bacteria typically start on the outside of the yolk membrane or in the surrounding egg white, and only in very small numbers. Fresh egg white is naturally inhospitable to bacterial growth because it restricts available iron, a nutrient Salmonella needs to multiply. Growth really only takes off once storage-related changes to the membrane allow the bacteria to reach the iron-rich yolk contents.9International Journal of Food Microbiology. Contamination of egg shell and contents with Salmonella enteritidis: a review So even when an egg does harbor Salmonella, the number of organisms present in a fresh egg is usually tiny, and mayonnaise’s acid environment hits them before they have a chance to multiply.
What Commercial Mayonnaise Does Differently
If you buy mayonnaise from a grocery store, the raw-egg question is largely moot. Commercial manufacturers in the United States and the European Union almost universally use pasteurized eggs or pasteurized liquid egg products. Standard pasteurization heats whole eggs to about 57°C and holds them there for nearly an hour, which is long enough to destroy Salmonella without fully cooking the egg.10PubMed. A review on egg pasteurization and disinfection: Traditional and novel processing technologies Newer methods have made this even more practical. One federally approved technique uses ozone to pasteurize eggs in the shell, maintaining the look and taste of a raw egg while ensuring safety. Blind taste tests found no difference in aroma, flavor, texture, or overall liking between ozone-pasteurized and untreated eggs.11PubMed Central. Flavor and appearance of whole shell eggs made safe with ozone pasteurization
In-shell heat pasteurization has been demonstrated to achieve a seven-log reduction of Salmonella Enteritidis without significantly changing the functional or visual quality of the egg.12PubMed. Pasteurization of eggs in the shell A seven-log reduction means killing 99.99999% of the bacteria present, which is an enormous safety margin. Combined with the acid environment of the finished mayo, this makes commercial mayonnaise one of the microbiologically safest products in a typical refrigerator.
If you want to make homemade mayonnaise but are nervous about raw eggs, pasteurized shell eggs are available at many grocery stores. They look and behave exactly like regular eggs but have already been treated to eliminate pathogens. Using them gives you the best of both worlds: the flavor of fresh homemade mayo with the microbiological assurance of the commercial product.
Garlic, Mustard, and Other Ingredients That Help
Many classic mayonnaise and aioli recipes call for garlic, mustard, or both. These are not just flavor choices. Research has demonstrated that adding garlic or mustard to mayonnaise at concentrations commonly used in recipes increases the death rate of Salmonella Enteritidis.13Food Microbiology. Review: Fate of pathogens in home-made mayonnaise and related products Among the spices that have been tested, clove showed the strongest antimicrobial effect, followed by garlic. Mustard and ginger had more modest bacteriostatic activity.14Food Control. Effects of spices on growth and survival of Escherichia coli 0157 and Salmonella enterica serovar Enteritidis in broth model systems and mayonnaise More recent work has explored microencapsulated mustard essential oil as both an antioxidant and antimicrobial additive in mayonnaise, finding that it inhibited growth of target bacteria over 40 days of storage.15PubMed. Antioxidant and antimicrobial efficacy of microencapsulated mustard essential oil against Escherichia coli and Salmonella Enteritidis in mayonnaise
So the garlic in traditional Provençal aioli and the mustard in Dijon-style mayo are not just there for taste. They provide a genuine additional barrier against bacterial survival. It is a nice example of how traditional food preparation sometimes arrives at safe practices long before food science explains why they work.
The Potato Salad Myth
Mayonnaise has an undeserved reputation as the ingredient that makes picnic food dangerous. The popular belief goes something like this: potato salad sits out in the sun, the mayonnaise goes bad, and everyone gets sick. In reality, the mayonnaise is probably the safest component of that potato salad.
Research has tested this directly. In one study, Listeria monocytogenes was inactivated in potato salad regardless of the mayonnaise pH used, while the same pathogen was able to grow in ham salad at every temperature tested.16PubMed. Effect of mayonnaise pH and storage temperature on the behavior of Listeria monocytogenes in ham salad and potato salad The acid in the mayo was protecting the potato salad, not endangering it. In contrast, egg salad and pasta salad showed a different pattern: Listeria was able to grow in both at every temperature tested, with growth more rapid in egg salad, which provided a richer nutritional environment for the bacteria.17PubMed. Growth of Listeria monocytogenes in egg salad and pasta salad formulated with mayonnaise of various pH and stored at refrigerated and abuse temperatures
The pattern is clear: it is the protein-rich, near-neutral-pH ingredients like ham, eggs, and pasta that provide the growth medium for dangerous bacteria. The mayonnaise, with its low pH, actually works against bacterial growth in the surrounding food. When someone gets sick from a picnic dish, the culprit is almost always the combination of high-protein ingredients held too long at warm temperatures, not the mayonnaise itself.
When the Safety Net Has Holes
All of the above paints an encouraging picture, but the science has some important caveats. A 2024 study specifically investigated acid-tolerant strains of Salmonella in mayonnaise and found that these hardier variants persisted significantly longer than their acid-sensitive counterparts. When stored in the refrigerator, acid-tolerant Salmonella declined more slowly than at room temperature, and the researchers concluded that current safe-food recommendations for raw-egg sauces are not fully effective at eliminating these strains.18PubMed. The culturability of acid-tolerant Salmonella in mayonnaise, a raw egg-based sauce
This is a sobering finding because acid-tolerant bacteria are not just a lab curiosity. Salmonella can develop acid tolerance when exposed to gradually decreasing pH levels, which can happen naturally in certain environments. The study generated acid-tolerant strains by stepping the pH down over three days, a process that mimics what can occur when bacteria encounter mildly acidic conditions before being plunged into a strongly acidic one like mayonnaise.
For most healthy adults, the combination of low initial contamination rates, acid, and common sense about storage makes the practical risk of homemade mayo quite low. But for people who are pregnant, very young, elderly, or immunocompromised, the margins matter more. Government food-safety agencies in the US, UK, and EU consistently recommend that these groups avoid foods containing raw or undercooked eggs. If you fall into one of those categories and want to make mayo at home, pasteurized eggs are the straightforward solution.
How to Make Homemade Mayonnaise Safer
If you are making mayonnaise from raw shell eggs at home, a few practices can push the risk even lower:
- Use enough acid: A tablespoon or more of lemon juice or vinegar per egg yolk is a common starting point. Lemon juice has a slight edge over vinegar alone for killing Salmonella at refrigerator temperatures.
- Let it rest before serving: Freshly made mayo has not had time for the acid to work on any bacteria that may be present. Letting it sit at room temperature for an hour or two before refrigerating allows the acid kill to accelerate.
- Add garlic or mustard: Both contribute real antimicrobial activity on top of flavor.
- Use fresh eggs: The longer an egg has been stored, the more its internal membrane degrades and the more opportunity bacteria have had to reach the yolk. Fresh eggs from a reputable source carry less risk.
- Use pasteurized eggs if in doubt: They are widely available and eliminate the concern entirely.
The resting step is one that many home cooks skip, and it is arguably the most underrated. As the research on temperature-dependent kill rates shows, a couple of hours at kitchen temperature is enough for the acid to dramatically reduce any Salmonella present, much more effectively than putting the mayo straight into the cold fridge where the kill slows down.
What Keeps Commercial Mayo Shelf-Stable for Months
Beyond pasteurized eggs and acid, commercial mayonnaise relies on a few additional strategies to maintain quality over a shelf life that can stretch past a year. One is the use of chelating agents like EDTA, which bind metal ions that would otherwise catalyze fat oxidation and cause the product to go rancid. Recent research has explored replacing EDTA with clean-label alternatives like rosemary extract, which actually outperformed EDTA in controlling oxidation products and maintaining color over 150 days of storage.19Applied Food Research. Evaluation of the sensory properties and antioxidant activity of clean rosemary extracts for an effective replacement of EDTA in Mayonnaise
Commercial mayo also benefits from precision manufacturing that controls the oil droplet size in the emulsion and ensures uniform acid distribution throughout the product. Home cooks are blending by hand or with an immersion blender, which produces a less uniform emulsion. That is not inherently dangerous, but it does mean that homemade mayo may have slight pockets of differing acidity. Using enough acid and mixing thoroughly are the home cook’s best tools for mimicking that uniformity.
Oil quality matters too, though not for microbial safety. Oxidized or off-flavored oils will not cause foodborne illness, but they will ruin your mayo’s taste before the acid even has a chance to work on bacteria. Neutral, fresh oils stored properly are the starting point for a mayonnaise that tastes good and lasts well in the fridge for a week or so, which is about as long as homemade mayo should be kept regardless of safety considerations.
Reduced-Calorie Versions and Bacterial Survival
If you have wondered whether light or reduced-calorie mayonnaise is as safe as the full-fat version, the answer is nuanced. The E. coli study mentioned earlier found that reduced-calorie mayonnaise dressing actually killed bacteria faster than real (full-fat) mayonnaise at the same temperature, particularly at refrigerator storage.6PubMed Central. Death of enterohemorrhagic Escherichia coli O157:H7 in real mayonnaise and reduced-calorie mayonnaise dressing as influenced by initial population and storage temperature The likely reason is that reduced-fat formulations have more water available, and since the acid is dissolved in the water phase, there is simply more acid in contact with any bacteria present. In full-fat mayo, much of the volume is oil droplets that bacteria cannot access, and the water phase where the acid lives is more concentrated but physically smaller.
That said, reduced-calorie mayonnaise and mayo-style dressings sometimes have a higher pH than full-fat versions because manufacturers adjust the flavor balance to compensate for reduced fat. If the pH creeps above 4.2, the product’s antimicrobial advantage may narrow. Checking the label will not tell you the exact pH, but choosing brands that list vinegar or lemon juice prominently in the ingredient list is a reasonable proxy for adequate acidity.