Gas and bloating are usually harmless and treated with self-care — eating smaller meals slowly, cutting back on gas-producing foods and fizzy drinks, and staying active — with over-the-counter anti-gas products and enzyme aids for added relief. Treatment that goes beyond this depends on the underlying cause (such as constipation, lactose intolerance, or IBS).
Available without a prescription — follow each label.
simethicone Gas-X / Mylicon Antiflatulent (anti-gas agent) | Best for the uncomfortable pressure, fullness and bloating of trapped gas. It groups small gas bubbles into larger ones so gas passes more easily by burping or flatus. Sold as tablets, chewables, capsules and drops. Note: NHS cautions that we cannot be certain it truly works for these symptoms, but it is widely used and very low-risk. |
alpha-galactosidase Beano Digestive enzyme (OTC supplement) | Best taken at the start of a meal to prevent gas from beans, lentils, and gassy vegetables (broccoli, cabbage, onions). It breaks down the hard-to-digest carbohydrates in these foods so they cause less gas. If you take a diabetes medicine such as acarbose or miglitol, check with a pharmacist first. |
lactase Lactaid Digestive enzyme | Best for people whose gas and bloating come from dairy (lactose intolerance). Taken with milk or dairy foods, it supplies the enzyme needed to digest lactose. Helpful only if dairy is your trigger. |
MiraLAX Osmotic laxative | Best when bloating is driven by constipation. NHS notes laxatives can ease constipation-related bloating; this osmotic laxative draws water into the stool to make it easier to pass. Use short-term and follow the label. |
psyllium (ispaghula husk) |
A doctor may prescribe these — not for self-treatment.
dicyclomine Bentyl (US) / hyoscine butylbromide = Buscopan (UK) Antispasmodic | For IBS-related cramping and bloating, a doctor may prescribe an antispasmodic to relax gut muscle spasm. In the US, dicyclomine (Bentyl) is prescription-only; persistent or severe symptoms warrant a clinician's assessment rather than self-treatment. |
Linzess Guanylate cyclase-C agonist | For diagnosed IBS with constipation that does not respond to self-care and laxatives, a doctor may prescribe a prescription IBS medicine such as linaclotide. This is started and monitored by a clinician — not something to take on your own. |
amitriptyline (low-dose) Elavil Tricyclic antidepressant (used for gut pain) | For painful IBS-type bloating and cramping, a doctor may prescribe a low-dose tricyclic to calm gut nerve signaling. Requires a prescription and medical supervision. |
Xifaxan Gut-targeted antibiotic | If a clinician suspects small intestinal bacterial overgrowth (SIBO) as the cause of bloating, a doctor may prescribe a short course of a gut-acting antibiotic. This needs a proper diagnosis first — antibiotics are prescription-only and not for routine gas. |
Start with diet and habits, since most gas and bloating is harmless: eat smaller meals more slowly with your mouth closed, cut back on fizzy drinks, beer, and gas-producing foods (beans, lentils, broccoli, cabbage, cauliflower, Brussels sprouts, onions), avoid the sweetener sorbitol and chewing gum, and stay active. Then match a product to your trigger: simethicone for general gas pressure and fullness; alpha-galactosidase (Beano) before a bean- or vegetable-heavy meal; lactase if dairy is the culprit; and a laxative or soluble fiber if constipation is driving the bloat. If self-care and pharmacy options do not help, or symptoms keep coming back, see a clinician — the right next step depends on the cause (for example, IBS, lactose intolerance, or coeliac disease), which may need testing and a prescription.
See a GP/clinician if bloating is regular, won't go away or keeps coming back, or if diet changes and pharmacy medicines haven't helped — especially with unintentional weight loss, blood in your stool (or dark, tarry stools), persistent diarrhea or constipation, worsening heartburn, or ongoing nausea/vomiting; these can signal coeliac disease, IBS, or, less commonly, ovarian, bowel, or other cancers and need evaluation. Seek urgent care (call 111 in the UK) if bloating comes with vomiting, a fever, a swollen abdomen, or an inability to poop or pass gas. Get emergency help (call 999 in the UK, or 911 in the US / go to A&E or the ER) for sudden severe stomach pain with a swollen, hard abdomen, vomiting blood, or severe difficulty breathing.
General reference, not medical advice, and not a substitute for your doctor or pharmacist. The right choice depends on your symptoms, health conditions, age, and other medicines — always read each label and confirm before taking anything.
| Best for constipation-related bloating; soluble fiber is preferred over insoluble fiber when bloating is a problem. Increase the dose slowly and drink plenty of water, as too much fiber too fast can briefly worsen gas. |