What Makes Your Sweat Smell Like Onions: Causes & Fixes

Sweat that smells like onions is caused by sulfur-containing compounds called thioalcohols, which are produced when specific bacteria on your skin break down otherwise odorless proteins in your sweat. The onion smell isn’t coming from the sweat itself. Fresh sweat is virtually odorless. The stink develops after bacteria get to work on it, and the intensity depends on your skin’s bacterial makeup, what you eat, your genetics, and which type of sweat gland is doing the sweating.

The Bacteria Behind the Smell

Your underarms host a dense community of microbes, dominated by three main groups: Staphylococcus, Corynebacterium, and Cutibacterium. Among these, a species called Staphylococcus hominis is the primary culprit behind onion-scented sweat. It produces a compound called 3M3SH, a thioalcohol that smells like rotten onions or meat. Thioalcohols get their pungency from sulfur, and even in trace amounts they’re among the most potent odor molecules your body produces.

The process works like a small assembly line. Your apocrine glands secrete an odorless precursor molecule onto the skin surface. S. hominis pulls this molecule inside the bacterial cell using a specialized transporter, strips it apart with enzymes, and releases the volatile, sulfur-containing end product back out. That volatile compound is what hits your nose. Research published in Scientific Reports traced this bacterial machinery back roughly 60 million years, meaning odor-forming staphylococci have been doing this far longer than humans have existed. Staphylococcus haemolyticus and certain Corynebacterium species also contribute to thioalcohol production, though S. hominis appears to be the most efficient.

Why Apocrine Sweat Smells Worse

You have two main types of sweat glands. Eccrine glands cover most of your body and produce thin, watery sweat that’s mostly salt and water. Their job is temperature regulation, and the sweat they make doesn’t give bacteria much to work with. Apocrine glands are a different story. Found mainly in your armpits, groin, and scalp, they produce a thicker secretion loaded with lipids, proteins, sugars, and ammonia. This nutrient-rich mix is exactly what skin bacteria feed on, and the waste products they generate are what you smell.

Apocrine glands don’t become active until puberty, which is why young children rarely have noticeable body odor. These glands also respond to emotional stimuli, not just heat. Stress-triggered sweat comes largely from apocrine glands and delivers a bigger payload of the proteins and fats that bacteria convert into pungent compounds. This is why you may notice a sharper onion-like smell after a stressful meeting compared to a routine workout.

Foods That Fuel the Onion Smell

What you eat directly influences what your sweat smells like. Sulfur-rich foods are the biggest drivers of an onion-like odor because your body metabolizes their sulfur-containing amino acids (methionine and cysteine) and excretes sulfur byproducts partly through sweat. The most common dietary sources include onions, garlic, leeks, chives, and shallots, all members of the Allium family. More than half of the volatile compounds in these vegetables contain sulfur. Cruciferous vegetables like broccoli, cauliflower, and cabbage are also significant sources, along with red meat.

When you eat garlic, for example, crushing or cooking it releases compounds like allicin and diallyl disulfide. Your body processes these through several metabolic pathways involving the liver and gut bacteria, and some of the resulting sulfur compounds end up secreted through your skin. The effect can last a day or two after a sulfur-heavy meal. If you’ve recently noticed a stronger onion smell to your sweat, your diet over the past 24 to 48 hours is worth reviewing before assuming something is wrong.

Genetics Play a Role

A gene called ABCC11, which is active in apocrine sweat glands, controls how much odor precursor material your glands release in the first place. People who carry two copies of a specific variant of this gene (the 538G>A change) produce significantly fewer of the characteristic underarm odorants. This variant is most common in East Asian populations, where it’s associated with nearly complete loss of typical body odor. If you carry the standard version of the gene, your apocrine glands secrete more of the raw material that bacteria convert into thioalcohols and fatty acids, giving you a stronger baseline odor.

This genetic difference also explains why body odor intensity varies so much from person to person even when diet, hygiene, and activity levels are similar. You can’t change your ABCC11 status, but knowing that genetics set your baseline can help you focus on the factors you can control.

When Body Odor Signals a Health Issue

Most onion-smelling sweat is normal, but persistent, unusually strong body odor that doesn’t respond to hygiene changes may qualify as bromhidrosis, a recognized medical condition. Bromhidrosis is graded on a severity scale: mild cases produce noticeable odor only after exercise or heavy labor, moderate cases generate a strong smell during everyday activities that people nearby can detect, and severe cases produce a pungent odor even at rest.

Certain health conditions can also shift your body odor. Hyperthyroidism, hormonal changes during menopause, and endocrine disorders can increase sweating and change its composition. The character of the smell matters too. A fruity or acetone-like odor may point to diabetic ketoacidosis, while a bleach-like smell can signal liver or kidney problems. An onion or sulfur smell, by contrast, typically points to bacterial metabolism of normal sweat rather than a systemic disease, especially if it’s coming from your armpits.

Reducing the Onion Smell

Since the odor is produced by bacteria rather than sweat itself, the most effective strategies target the microbial population on your skin. Washing with antiseptic or antibacterial soap reduces the number of odor-producing bacteria in the armpit. Antiperspirants containing aluminum compounds work on two fronts: they temporarily block sweat ducts to reduce the raw material bacteria feed on, and the aluminum salts create a mildly acidic environment that inhibits bacterial growth.

For stubborn odor that doesn’t improve with over-the-counter products, topical antimicrobials like benzoyl peroxide can be applied to the underarms to more aggressively reduce bacterial counts. Prescription topical antibiotics are sometimes used when antiseptics alone aren’t enough, though they carry a risk of promoting bacterial resistance and are typically reserved for more persistent cases.

On the dietary side, cutting back on garlic, onions, and other high-sulfur foods for a few days is the simplest test of whether your diet is driving the smell. Wearing breathable, natural-fiber clothing also helps by reducing the warm, moist environment where odor-causing bacteria thrive. Shaving or trimming underarm hair can make a difference too, since hair traps sweat and gives bacteria more surface area to colonize.