Lift your arm and take a whiff…or if you suspect that you’re impervious to your own scent, ask a really, really close friend to do the sniff test for you. Does your BO make you or your friend say PU? You can’t blame it all on tough workouts or steamy weather. Instead, certain foods could be the culprits behind your stinky smell.

The reason: Compounds found in particular foods can affect the composition of your sweat. Although sweat itself generally doesn’t smell much, when the naturally occurring bacteria on the surface of your skin start feeding on that sweat, the microorganisms produce by-products that can be quite malodorous—particularly when those food compounds enter into the mix. Because your DNA is unique, your sweat is unique, too…so foods that cause no problems for your friends might be real stink bombs for you.

To find out how to tell which foods present pungent problems for any particular person and what can be done about it, we turned to Debra Jaliman, MD, an assistant clinical professor of dermatology at the Icahn School of Medicine at Mount Sinai in New York City. She said that daily bathing can slough off some of the bacteria on the skin’s surface and reduce your natural scent, but there’s nothing you can do to completely eliminate the bacteria or halt production of all perspiration (nor would you want to). If you’re already paying good attention to personal hygiene, the next step is to do some dietary detective work.

IDENTIFY YOUR STINKERS

Keep a food log for several weeks, writing down everything you eat and also taking notes on how you smell each day. (For a second opinion, you might ask a loved one to do a daily sniff test on your armpit, neck and/or crook of the elbow, too.) Depending on the food, what you eat generally affects your sweat’s scent starting within a few hours or by the next day and continuing for several days.

When you notice (or are told) that your body odor is worse, review everything you’ve eaten in the past few days, looking for patterns. Did you smell funkier the day after both of those hamburger dinners, for instance? Once you have identified a possible suspect, try eliminating it from your diet for a week or two to see whether your scent improves. If it does, you may want to avoid or at least limit that food in the future.

PRIMARY SUSPECTS

Here are foods that most commonly cause body odor problems—so be sure to consider them as you try to detect your personal troublemakers.

Red meat. Researchers in the Czech Republic conducted a very interesting experiment. Two groups of men followed identical diets for two weeks, with one notable exception—one group ate red meat twice daily, while the second group ate no red meat. On the last day, the men wore pads under their armpits for 24 hours. Next, women volunteers sniffed the armpit pads…and reported that the men in the no-meat group had scents that were significantly more attractive, more pleasant and less intense. The amino acids in red meat may be to blame for the undesirable odor.

Cruciferous and allium vegetables. Broccoli, brussels sprouts, bok choy, cabbage, cauliflower and kale are all cruciferous…onions, garlic, shallots, leeks and scallions all belong to the allium category. What do they have in common? They all contain sulfur. When you eat these veggies, your body breaks down the sulfur into compounds that are similar to those responsible for the smell of rotten eggs. Those smelly compounds can get into your perspiration via your bloodstream and alter your natural body odor.

These vegetables generally are so healthful that it would be a poor trade-off to avoid them altogether solely in the interest of smelling sweeter, Dr. Jaliman said. Experiment to see whether you do fine on certain types of these veggies, then eliminate only those that have a truly foul effect on your scent. Or, keeping in mind that the odor will subside within a few days, avoid cruciferous and allium vegetables only in the four days before a really important event, such as a job interview or wedding.

Seafood. People with a metabolic disorder called trimethylaminuria develop a fishy odor after consuming seafood because they cannot break down the chemical trimethylamine that is naturally found in seafood. The odor appears within a few hours after consumption. This uncommon genetic disorder can be diagnosed with a urine test that checks for elevated levels of trimethylamine. People who have the disorder may need to avoid seafood and other foods that contain precursors to trimethylamine, such as eggs, liver, legumes and milk from grass-fed cows.

Sugary foods. Though there are no scientific studies proving the claims, anecdotal reports abound about body odor worsening after people eat foods containing a lot of refined sugar. It may be that the spike in blood sugar caused by eating these foods affects the composition of your sweat…and/or that yeast overgrowth causes the sugar to break down into alcohols that contribute to body odors. Here is one more good reason to avoid refined sugar!

Alcohol. When you drink alcohol, your liver metabolizes most of it…but some is released through your respiratory system (giving you the trademark “alcohol breath”) and through your sweat. The more you drink, the more you stink. The fix: If you drink, do so only in moderation—no more than one drink per day for women or two per day for men.

Low-carb diet. Many people find their body odor smells like eggs or ammonia when following a low-carb diet. The reason: A lack of carbs can cause the body to produce acidic smelly compounds called ketones. “Staying hydrated helps tame the smell, but to get rid of it completely, you’d have to adopt a more balanced diet instead of avoiding carbs altogether,” said Dr. Jaliman.

SWEETEN YOUR SCENT

You can “clean up” some of the changes in sweat caused by the foods above by increasing your consumption of foods that contain chlorophyll, the compound responsible for foods’ green coloring, Dr. Jaliman said. For instance, spinach and other dark leafy greens, which are rich in chlorophyll, are known to counteract odor. You also can get chlorophyll by chewing a sprig of fresh parsley, cilantro or mint immediately after meals…or by taking chlorophyll tablets (sold in drugstores, health-food stores and online).

Be sure to drink plenty of water, too, Dr. Jaliman said—this also helps cut down on body odor. Drinking unsweetened black or green tea is effective, too, because tea contains polyphenols that destroy odor-causing bacteria.

Caution: Rarely, a change in body odor may be linked to a serious disease, such as diabetes or cancer. If you experience a new change in body odor that persists for more than a few weeks, Dr. Jaliman said, it would be wise to see your doctor to rule out any significant health problems.

In the vast majority of cases, though, you can be reassured by the knowledge that modifications to your scent caused by food are temporary and nothing more than a nuisance. And hey, there’s always cologne.