Why Is Raw Egg in Mayonnaise Safe to Eat?

Raw egg in mayonnaise is safe primarily because the acid from vinegar or lemon juice creates an environment hostile enough to kill Salmonella and other harmful bacteria. The low pH of properly made mayonnaise, typically between 3.6 and 4.0, is well below what most foodborne pathogens can survive. Commercial mayonnaise adds another layer of protection by using pasteurized eggs, making it one of the safest condiments on your shelf.

How Acid Kills Bacteria in Mayonnaise

Mayonnaise is essentially an emulsion of oil, egg yolk, and an acid, either vinegar or lemon juice. That acid is doing more than adding flavor. When vinegar or lemon juice lowers the pH of the mixture to around 3.6 to 4.0, Salmonella bacteria lose their ability to survive and reproduce. Research published in Letters in Applied Microbiology found that mayonnaise made with wine vinegar and brought to a pH between 3.6 and 4.0 effectively prevented Salmonella transmission.

This matters because Salmonella thrives in neutral environments (around pH 7). Drop the pH low enough and the acid penetrates bacterial cell walls, disrupting their internal chemistry. The effect isn’t instant, though. It takes time for the acid to do its work, and both the type of acid and the temperature play a role in how quickly bacteria die off.

Vinegar vs. Lemon Juice

Both vinegar (acetic acid) and lemon juice (citric acid) can make mayonnaise safe, but they work slightly differently. Research comparing the two found that pure acetic and citric acid solutions reduced Salmonella counts more effectively than whole vinegar or lemon juice alone. That’s because whole vinegar and lemon juice contain other compounds that slightly buffer the acid’s antimicrobial punch.

In practical terms, both work well enough for homemade mayonnaise as long as you use enough. A good rule of thumb is at least one tablespoon of vinegar or lemon juice per egg yolk. The goal is getting the final mixture acidic enough, not just adding a splash for taste.

Why Commercial Mayonnaise Is Especially Safe

Store-bought mayonnaise has essentially zero risk of Salmonella for two reasons. First, the FDA requires that commercial producers use pasteurized eggs or egg products. Pasteurization heats eggs just enough to kill bacteria without cooking them, eliminating the Salmonella risk before the mayonnaise is even made. Second, commercial recipes are precisely formulated to hit a target pH and are tested for consistency.

This is why commercial mayonnaise has never been convincingly linked to foodborne illness outbreaks. When mayo-containing dishes like potato salad cause food poisoning, the culprit is almost always another ingredient (chicken, potatoes left at room temperature) rather than the mayonnaise itself. The mayo’s acidity actually helps slow bacterial growth in whatever it’s mixed with.

The Surprising Role of Temperature

Here’s something counterintuitive: refrigerating homemade mayonnaise right away may actually be less effective at killing bacteria than letting it sit at room temperature first. Research from a 2021 study found that acidified mayonnaise held at 25°C (room temperature) for four hours significantly reduced Salmonella counts. Mayonnaise stored immediately at 5°C (refrigerator temperature) still contained viable, disease-causing bacteria after 12 and even 24 hours.

The reason is straightforward. Acid kills bacteria faster in warmer conditions. Cold temperatures slow down everything, including the chemical reactions that destroy bacterial cells. The researchers noted that the common advice to refrigerate raw egg sauces immediately could actually place consumers at higher risk for salmonellosis, because the cold preserves bacteria that the acid hasn’t had time to kill yet.

This doesn’t mean you should leave mayonnaise out indefinitely. But allowing freshly made mayonnaise to sit at room temperature for a few hours before refrigerating gives the acid time to do its job.

What Makes Homemade Mayonnaise Riskier

The USDA does not recommend eating raw, unpasteurized shell eggs in any preparation, including homemade mayonnaise. Their official guidance is to use pasteurized in-shell eggs or pasteurized egg products if you’re making mayonnaise at home. Pasteurized eggs are widely available in grocery stores and behave identically to regular eggs in recipes.

The risk with homemade mayonnaise comes down to variables you can’t easily control. You don’t know the exact pH of your finished product without a meter. You don’t know whether the eggs you bought carry Salmonella (roughly 1 in 20,000 shell eggs in the U.S. is contaminated). And the initial bacterial load matters: a heavily contaminated egg may overwhelm the acid’s ability to kill bacteria quickly enough.

If you do use regular shell eggs, three factors make the biggest difference in safety: using enough acid to bring the pH below 4.0, letting the finished mayonnaise sit at room temperature for at least a couple of hours before refrigerating, and consuming it within a day or two. Using fresh, clean, uncracked eggs from a refrigerated source also reduces the odds of contamination in the first place.

Who Should Be Extra Cautious

For most healthy adults, even homemade mayonnaise with unpasteurized eggs carries a very low risk, especially when made with adequate acid. But Salmonella infections hit certain groups harder: young children, pregnant women, older adults, and anyone with a weakened immune system. For these groups, using pasteurized eggs eliminates the concern entirely without changing the taste or texture of the final product.