Gastritis is inflammation of the stomach lining, which may last for a short or long time. Treatment usually addresses the underlying cause, such as medications, stress, or handwashing practices.

Gastritis is a term that describes episodes of nausea and vomiting after eating. It occurs when the mucosa or stomach lining is inflamed, causing heartburn or bloating. However, people who get gastritis may not develop any symptoms regardless of the underlying cause — bacterial or otherwise.

There are two types of gastritis:

  • Acute: This means the inflammation develops and resolves quickly. Acute gastritis — particularly if viral — often resolves on its own with supportive treatment and no medication.
  • Chronic: This is long-term inflammation that can last for months or years if a person does not receive treatment.

Some people may have autoimmune gastritis, which develops when the immune system mistakenly attacks the healthy cells of the stomach lining.

Without treatment, acute gastritis caused by the bacteria Helicobacter pylori can become chronic. This can cause anemia and, in rare cases, cancer.

This article focuses on the treatment and preventive measures of gastritis. It also explains the types of tests doctors use during diagnostic exams and any possible complications.

A person washing their hands at a sinkShare on Pinterest
Jessica Peterson/Getty Images

Both medications and home remedies can treat gastritis.


The medication doctors prescribe depends on the type of gastritis an individual has.

However, the National Library of Medicine mentions the following drugs that may help reduce the amount of acid in the stomach:

Proton pump inhibitors (PPIs)

PPIs are a class of medications that decrease acid production in the stomach. Medical professionals may recommend them to people who have issues with chronic stomach acid.

They may also help other conditions, such as acid reflux, stomach ulcers, or damage that acid reflux has caused to the lower esophagus.

Short-term use of PPIs may cause a few mild side effects, such as nausea, abdominal pain, skin rash, and constipation.

PPIs doctors prescribe to treat gastritis include omeprazole or pantoprazole.

Furthermore, if gastritis has developed from H. pylori infection, individuals may take PPIs with two or three antibiotics.

H2 blockers

H2 blockers block the histamine hormone to reduce the amount of acid in the stomach. The Food and Drug Administration (FDA) has approved H2 blockers for short-term use to treat gastric ulcers, gastroesophageal reflux disease (GERD), and heartburn.

People who take H2 blockers may experience mild side effects, including diarrhea, drowsiness, fatigue, and abdominal pain.

Examples of H2 blockers that doctors prescribe for gastritis include ranitidine and famotidine.


Antacids are drugs that neutralize the acid in the stomach to relieve heartburn. They are available as liquids or chewable tablets.

The United Kingdom’s National Health Service (NHS) states that some of the side effects of antacids include flatulence, stomach cramps, and constipation.

Individuals may take aluminum hydroxide or magnesium hydroxide.

Home remedies

According to the NHS, doctors may recommend taking different pain medications if nonsteroidal anti-inflammatory drugs (NSAIDs) are the cause of gastritis.

A person may also consider the following:

  • reducing food portions and eating frequently
  • limiting alcohol consumption, if applicable
  • reducing stress
  • quitting smoking, if applicable
  • avoiding foods that may irritate the stomach, such as spicy and fried foods

Several tests can help healthcare professionals diagnose gastritis, including:

  • Stool sample: Doctors take a stool sample and send it to a laboratory to check for stomach bacteria that can cause gastritis. They may also take a separate stool sample to check for blood.
  • Upper endoscopy: During this procedure, the gastroenterologist inserts a thin tube with a camera into the stomach to check if there is inflammation. They may also take a small tissue sample for testing.
  • Blood test: This may be helpful to check if the individual has developed iron-deficiency anemia from stomach bleeding.

Diet and lifestyle habits can cause gastritis, such as:

  • drinking alcohol in excess
  • smoking
  • stress
  • taking NSAIDs for a long time

A person may also develop gastritis from a bacterial or viral infection or traumatic injury.

The National Institute of Diabetes and Digestive and Kidney Diseases lists less common causes of gastritis:

In general, gastritis responds well to treatment. However, complications may arise, including:

In people with autoimmune gastritis, physicians may recommend taking iron, folic acid, and vitamin B12 supplements to help prevent pernicious anemia, as the body may find it difficult to absorb these nutrients from food.

However, if they develop pernicious anemia, injectable vitamin B12 could be an option.

It may not be easy to prevent gastritis, as it depends if people have any other condition that can increase their risk for gastritis.

However, steps people can take to help prevent developing gastritis include:

  • engaging in handwashing habits to prevent H. pylori infections
  • managing stressful situations to reduce the chance of having stress-induced gastritis
  • avoiding eating spicy foods
  • limiting caffeine consumption
  • limiting alcohol consumption

Gastritis is a gastrointestinal issue that occurs when the stomach lining becomes inflamed.

There may be different causes for gastritis, such as infections, stress, NSAIDs, and eating spicy foods. Reducing food portions, learning how to manage stress, and avoiding smoking can lower the risk of developing gastritis.

Medications to help treat the condition mostly reduce acid production in the stomach.

If a person does not treat their symptoms, they may develop ulcers, vitamin deficiency, and anemia, among other complications.