We've all been there: One minute your stomach looks perfectly fine (think adorable '90s Britney) and the next you feel out-of-control full and puffy (head-shaving meltdown Britney). The culprit is bloat, which has the obnoxious ability to make your clothes feel tight and your rings pinch without setting off any alarms on the scale.

The beast we call bloat could be one of two very different things. The first is the formation of gas in the digestive tract, which can leave your belly uncomfortable and distended. The other is water retention, a buildup of excess fluid that is more likely to affect your limbs, hands, and feet and can be a sign of a serious medical problem. They both cause a swelling sensation, but they have different triggers—and solutions.

So how do you know for sure that your skirt is snug because of bloat? "There should be cyclical variation to it," says gastroenterologist Robynne Chutkan, the founder of the Digestive Center for Women in Chevy Chase, Maryland, and the author of the forthcoming book GutBliss (Avery). "You can't button your pants in the evening, but the next day it's better. It often gets worse as the day progresses." Fluid retention is a bit trickier to distinguish, but take note if your face and limbs, rather than your whole body, appear swollen; other signs include puffy cheeks and sock lines. And don't be surprised to find yourself suffering from both forms, since five or six factors may contribute to a runaway stomach. Fortunately, there are plenty of bloat-busting foods to avoid, others to embrace, and even a few tricks that have nothing to do with what you're eating.

After you indulge in a heavy meal, it's logical to blame your distended stomach on that extra helping of pasta or the cheese course you couldn't resist. But the culprit could be allergies rather than gluttony: Many adults are intolerant of lactose, gluten, or fructose to some degree without realizing it.

"If you can't break down milk sugar normally, then you'll finish the fermentation breakdown process in your colon and produce gas," says Brian E. Lacy, a professor at the Geisel School of Medicine at Dartmouth University and the director of its GI Motility Laboratory. "Even if you always drank milk, as you get older, you produce less of the lactase enzyme, and that makes dairy harder to digest." A similar process can happen with fructose, even when it's in the form of a seemingly harmless fruit salad. "You're trying to eat healthily, but it ultimately backfires by causing these symptoms," says Lacy.

If EA Stewart, a registered dietitian in Del Mar, California, suspects a food intolerance in clients, she puts them on a diet that restricts the amount of lactose, fructose, and nonabsorbable carbohydrates. She'll have them cut out some dairy, certain fruits and vegetables, grains such as wheat and rye, beans, some soy products, and certain sweeteners, such as honey, agave, and sugar alcohols. She then has her clients reintroduce those foods one at a time. "They'll know pretty quickly which foods are causing the problems," Stewart explains. "I find that can be very effective for gas and bloating."

Salt attracts moisture—think about how salt shakers cake up when it's humid outside. When you have a higher concentration of sodium in your bloodstream, your body holds on to water to dilute the concentration. Still, it's not easy to avoid when salt is hidden in everything—microwave meals, breakfast cereal, and even antacids. Many processed and canned foods are high in sodium, says Stewart.

"The maximum daily recommendation is 2,300 milligrams. That's achievable if you're cooking at home with fresh ingredients." If you must use something from a can, like chickpeas, rinse them off to remove excess sodium, or look for those labeled low-sodium. Drinking water also keeps your sodium-potassium balance in check.

Some fruits, like watermelon and cranberries, act as natural diuretics that reduce fluid retention. Still, don't just reach for the nearest Edible Arrangement. "Depending on how much you're having, the diuretic effect can be canceled out by sugar, which causes gas bloating," says Chutkan.

Go for vegetables that are relatively low in fructose, like asparagus and cucumber. "If my clients feel puffy, I'll tell them to dilute concentrated cranberry in a lot of water and drink it all day," says Kimberly Snyder, a nutritionist and the author of the forthcoming Beauty Detox Foods (Harlequin). "It's a powerful diuretic."

Replacing your usual indulgences with sugar-free gum and diet soda can feel virtuous, but zero-calorie good intentions can backfire. "Some artificial sweeteners contain sorbitol, a sugar alcohol that can't be absorbed by your gastrointestinal tract," says Chutkan. "They tend to ferment there and produce a lot of bacteria and gas, making them a huge cause of bloating." It's just another reminder that nothing is ever really free.

There's a reason people feel sluggish after a burger and fries, and it's not just guilt. "Fat is more difficult for the gastrointestinal tract to break down," says Chutkan. "So for some people, saturated-fatty foods like meat can trigger bloat because they slow digestion." Snyder warns that even vegetable oil has a similar effect. "Heating up saturated oils breaks them down quickly, which leads to bloating," she says.

Instead, Snyder recommends using coconut oil at low temperatures—it won't break down in the same way. Similarly, too much fiber can make you gassy. Insoluble fiber, the kind found in whole grains, can linger in the colon, where it ferments. Keep it to 25 grams a day. (To put that in perspective, an apple has about 4.5 grams, and a bowl of oatmeal has anywhere from 3 to 8 grams.)

Want to shed water weight fast? Cut your carbs. Carbohydrates promote glycogen storage in muscles, and that requires water. "When someone is consuming the same amount of carbohydrates every day, this water storage isn't noticeable," says Stewart.

But if you cut back, your glycogen stores are depleted and you lose water weight. Keep in mind, though, that the effects are temporary. And it's not just the starchy and delicious that will get you in trouble: "People don't realize that wheat is in many processed products," says Snyder. People think about bread and pasta, but soy sauce can also cause problems.

So you've slipped up and snacked on a handful (or six) of salty pretzels. The good news is that avocados and other potassium-rich foods combat puffiness by balancing excess sodium and reducing water retention. "Look for foods that are high in potassium or that have a balance of potassium and sodium, like celery," says Snyder. If you're not in the mood for guacamole, other possibilities include cantaloupe, oranges, carrots, bananas, and—if you're feeling trendy—coconut water.

There are lots of reasons to skip that second (or third) glass of wine, and you can now add bloating to the list. Don't let the fact that alcohol is a diuretic fool you. "By keeping your body from processing things properly, alcohol can blow you up," explains Snyder. "Alcohol is very acid-forming in the body, and an acidic body tends to hold on to excess water weight. Caffeine can have a similar effect." And then there's the fact that alcohol and salty snacks were made for each other, so consuming one usually means too much of the other.

When you do indulge, avoid sugary and boil-brewed alcohols, like tequila, rum, and beer, which has the added problem of carbonation. "They're extremely processed," says Snyder. "Tequila is one step away from agave, which is over 90 percent fructose." The purest hard liquor—i.e., the one with the least sugar—is vodka, so Russians have the right idea.

Like alcohol, certain drugs can affect the body's ability to hold on to water. Birth control pills, steroids, and even ibuprofen are the worst offenders. It's tempting to chalk up bloating to your diet, but if you're on a new medication and notice that you feel puffy or crampy, you might want to discuss other options with your doctor. You should also talk to your physician if you've changed your diet and other habits and still feel bloated. It could be a sign that something more serious is going on.

Is there anything exercise doesn't fix? With bloating, it doesn't hurt to get physical. "The GI tract is muscle," explains Chutkan. "It gets flabby if you're not exercising." Physical exertion can stimulate gastrointestinal contractions known as peristalsis, making digestion (and, yes, passing gas) easier. Focus on activities that engage the abdomen, like crunches, twisting yoga poses, or Pilates. Chutkan suggests taking a small dumbbell—your hands will also do the job—and gently moving it in a clockwise direction over your abdomen to push the gas out.

Wolfing your food isn't just bad manners. Fast eaters tend to take in more air and therefore experience more gas. Those other bad habits Grandma warned you about, like chewing gum, sucking on hard candy, and smoking, also increase gulped air. Carbonation can be a problem, though it depends on your sensitivity. Mere seltzer water will get to some people, while others are left unfazed by several San Pellegrinos a day. And if you're about to sit down to a feast, Snyder suggests beginning with a green salad, which gets the digestive process rolling. "All those enzymes at the beginning help you digest the rest of the food that follows," she says.