We include products we think are useful for our readers. If you buy through links on this page, we may earn a small commission. Here’s our process.

Medical News Today only shows you brands and products that we stand behind.

Our team thoroughly researches and evaluates the recommendations we make on our site. To establish that the product manufacturers addressed safety and efficacy standards, we:
  • Evaluate ingredients and composition: Do they have the potential to cause harm?
  • Fact-check all health claims: Do they align with the current body of scientific evidence?
  • Assess the brand: Does it operate with integrity and adhere to industry best practices?
We do the research so you can find trusted products for your health and wellness.
Was this helpful?

In April 2020, the Food and Drug Administration (FDA) requested that all forms of prescription and over-the-counter (OTC) ranitidine (Zantac) be removed from the U.S. market. They made this recommendation because unacceptable levels of NDMA, a probable carcinogen (or cancer-causing chemical), were present in some ranitidine products. People taking prescription ranitidine should talk with their doctor about safe alternative options before stopping the drug. People taking OTC ranitidine should stop taking the drug and talk with their healthcare provider about alternative options. Instead of taking unused ranitidine products to a drug take-back site, a person should dispose of them according to the product’s instructions or by following the FDA’s guidance.

Heartburn and gas can occur together. Although one does not cause the other, they may make each other worse. Certain underlying conditions can potentially cause both heartburn and gas. In these cases, treating the underlying condition will help relieve both the gas and heartburn.

A person can have heartburn or gas independently of each other. This is because the two conditions have different causes, even though they both relate to digestive processes and issues.

However, making lifestyle changes to prevent heartburn can also help prevent excessive gas.

Read on to learn more about heartburn and gas, including how to prevent and treat them.

Woman experiencing heartburn or gasShare on Pinterest
Heartburn causes a burning sensation in the chest.

Heartburn occurs as a symptom of acid reflux. According to the National Institute of Diabetes and Digestive and Kidney Diseases, up to 20 percent of people in the United States have a chronic form of acid reflux called gastroesophageal reflux disease.

When acid from the stomach pushes up into the food pipe, it can cause a burning pain in the chest. For some people, this sensation may feel like a symptom of a heart attack.

People experience heartburn in different ways, but some of the common sensations include:

  • burning or pain in the chest
  • burning that may move up the throat
  • a tightening sensation in the throat and chest
  • sharp pain in the chest

For some people, heartburn may present as pain behind the breastbone. For others, it may feel like pain or burning higher in the throat.

Heartburn is common after eating meals. A person may trigger heartburn by lying down or bending over shortly after eating. Some common triggers of heartburn include:

  • heavy, fatty foods
  • spicy foods
  • coffee
  • alcohol
  • acidic foods, such as tomatoes

In addition, some risk factors make a person more likely to experience heartburn, including:

Some medications can also increase the risk of heartburn, such as:

Share on Pinterest
Brussels sprouts can cause gas.

Gas is a natural part of the digestive process. A person passes gas several times per day through either the rectum or mouth.

Gas can become trapped in the digestive tract due to swallowing or the breakdown of the food as it passes through the large intestine.

Bacteria in the large intestine are responsible for the smell of flatulence.

As undigested food moves through the digestive tract, bacteria in the large intestine help break it down further. Foods that the body cannot digest give the bacteria more to break down, and they produce stronger-smelling gas as they consume the food.

People may experience gas from eating different foods. A type of food that causes one person to have gas may not cause any issues in another person.

However, some foods are more likely to cause a person to produce excess gas.

These foods include:

  • some fruits, such as pears, peaches, and apples
  • certain vegetables, including asparagus, broccoli, cauliflower, beans, and Brussels sprouts
  • some whole grains
  • onions

Gas and heartburn are not always connected directly. However, it is possible for the two to exist together and make each other worse. It is also possible for a person to manage them in a similar way.

One common cause of heartburn and gas is eating too much too quickly. Eating large amounts of food in one sitting can trigger heartburn, while eating quickly may cause a person to swallow more air, resulting in gas.

Drinking fizzy alcoholic drinks, such as beer, can also cause both conditions to co-occur.

Relieving gas through belching can cause heartburn to worsen. The release of air when someone passes gas either during or immediately after a meal can cause more acid to rise in the throat. If this occurs, a person may experience heartburn.

Share on Pinterest
Antacids can treat heartburn, but not gas.

People can treat heartburn directly with a couple of different types of medication that are available on prescription or over the counter (OTC).

Medications for heartburn include:

  • Antacids, which offer quick relief for heartburn.
  • H2 blockers, such as famotidine (Pepcid), which block the amount of acid that a person’s stomach produces.
  • Proton pump inhibitors, which are longer-lasting medications that act in a similar way to H2 blockers. Examples include omeprazole (Prilosec) and lansoprazole (Prevacid).

There are fewer medications to treat gas. Antacids do not typically prevent or treat gas. Instead, a person can try the following drugs:

  • Simethicone, commonly known as Gas-X or Mylanta, which helps break down gas in the digestive tract.
  • Alpha-galactosidase products, such as Beano, which help the body break down the carbohydrates in vegetables and beans.
  • Lactase supplements, such as Lactaid, which help the body digest milk-based products.

Some people claim that activated charcoal may help as a home remedy for gas. Charcoal is potentially safe to consume, but it can stain clothes and teeth. It may also prevent certain medications from being effective.

Some people may also have success using home remedies for heartburn. Some potential remedies to try include:

  • standing up after consuming a meal or a large amount of food
  • wearing loose-fitting clothing
  • raising the upper body when lying down
  • adding ginger to meals or drinks as a spice or taking supplements
  • eating licorice
  • drinking a mixture of baking soda and water to reduce the acid

People should check with their doctor before trying the baking soda remedy. It is also worth noting that these remedies may not work for everyone.

Preventing gas, heartburn, or both may often involve making lifestyle changes. A person can generally prevent both heartburn and gas by:

  • eating smaller meals more frequently throughout the day
  • eating slowly
  • avoiding heavy, greasy foods
  • avoiding known trigger foods, such as milk, beans, and spicy foods
  • limiting alcohol intake
  • stopping smoking
  • eating a balanced, healthful diet
  • losing weight if overweight or obese

Gas and heartburn can occur either together or separately. There is not always a link between the two. Often, making simple lifestyle changes can help a person prevent both gas and heartburn.

Gas is not typically a cause for concern. In most cases, it is a normal part of the digestive process.

People should also not worry about experiencing heartburn occasionally, especially after eating trigger foods. Often, OTC medications can treat infrequent heartburn.

However, frequent or regular heartburn or gas may indicate the presence of an underlying condition that may need treating. A doctor can help determine whether another condition is responsible for the symptoms.

The OTC medications that this article lists are available to purchase online.


What is the best diet for someone who is prone to heartburn and gas?


It is essential to eat a balanced, healthful diet to maintain optimum health. Include fruits and vegetables in the diet every day.

Foods that commonly cause heartburn include chocolate, citrus fruits, tomatoes, onions, and spicy foods. Beans, broccoli, cabbage, dairy products, and soft drinks often cause gas.

Keep a food diary to help identify the foods that cause heartburn or gas and avoid the foods that cause these problems.

Gerhard Whitworth, RN Answers represent the opinions of our medical experts. All content is strictly informational and should not be considered medical advice.

Was this helpful?