How Is Gastritis Treated? Causes, Tests and Lifestyle Measures That May Help
Gastritis treatment depends on what is causing inflammation of the stomach lining. Learn how doctors identify the cause, which tests may be recommended, how gastritis is treated, and which lifestyle measures may help protect your stomach.

Gastritis treatment depends on the cause. Doctors may test for H. pylori, review painkillers and alcohol, and may prescribe medicines that reduce stomach acid or treat infection. Regular meals, avoiding personal triggers and taking medicines exactly as directed also help. Persistent symptoms may need further tests.
In this guide
How Is Gastritis Treated?
For the wider picture, see our guide on Abdominal Pain Causes & Gastritis: Symptoms and Treatment.
Gastritis is inflammation of the stomach lining, and treatment depends on the underlying cause. Simply treating stomach pain may provide temporary relief without addressing the reason the inflammation developed.
Gastritis can be associated with Helicobacter pylori (H. pylori) infection, certain medications, alcohol, or other medical conditions. Some people have symptoms such as upper abdominal pain, nausea, bloating, or indigestion, while others may have few noticeable symptoms.
The first step is finding out what may be causing the problem.
Step 1: Identify the Cause
Your doctor may ask about your symptoms, medications, medical history, alcohol use, and previous digestive problems.
One important question is whether you regularly use nonsteroidal anti-inflammatory drugs (NSAIDs) such as ibuprofen or naproxen. These medicines can irritate the stomach lining in some people.
Your doctor may also consider whether H. pylori infection could be contributing to your symptoms.
H. Pylori Testing
H. pylori can affect the stomach lining and is an important cause of gastritis and peptic ulcer disease.
Depending on your situation, testing may involve a breath test, stool test, blood test, or other evaluation. The appropriate test depends on your symptoms and clinical circumstances.
If H. pylori is confirmed, treatment generally involves specific medicines prescribed by a healthcare professional to eliminate the infection and reduce the risk of related complications.
Step 2: Medicines May Be Used
Treatment varies according to the cause.
Doctors may recommend medicines that reduce stomach acid, particularly when acid-related irritation or another related digestive condition is present.
Depending on the situation, these can include acid-reducing medicines such as proton pump inhibitors or H2-receptor blockers.
If a medication is contributing to stomach irritation, your doctor may review whether it should be changed, reduced, or replaced.
Do not stop a prescribed medicine on your own, even if you think it is causing stomach symptoms.
Step 3: Make Stomach-Friendly Lifestyle Changes
Lifestyle measures may help reduce irritation and improve digestive symptoms, although they do not replace treatment for an underlying infection or other medical condition.
Helpful measures may include:
-
Limiting alcohol if it worsens your symptoms
-
Avoiding foods that consistently trigger discomfort
-
Eating regular, balanced meals
-
Avoiding very large meals if they aggravate symptoms
-
Taking medicines exactly as prescribed
-
Avoiding unnecessary use of NSAID painkillers
There is no single "gastritis diet" that works for everyone. Identifying your own triggers is often more useful than unnecessarily eliminating large numbers of foods.
What About Spicy Foods?
Spicy or acidic foods may worsen symptoms for some people, but they are not necessarily the underlying cause of gastritis.
If a particular food consistently causes discomfort, reducing it may help you feel better.
When Might More Testing Be Needed?
Some people with persistent or concerning symptoms may need further investigation.
An upper gastrointestinal endoscopy uses a flexible camera to examine the esophagus, stomach, and upper part of the small intestine. It may be considered when symptoms warrant a closer examination or when the diagnosis is uncertain.
The need for endoscopy depends on factors such as symptoms, age, medical history, and clinical findings.
When Should You Seek Medical Attention?
Do not assume persistent stomach pain is simply gastritis.
Seek urgent medical attention if you vomit blood, pass black or bloody stools, experience severe or rapidly worsening abdominal pain, faint, or develop severe weakness or dizziness.
Persistent vomiting, unexplained weight loss, difficulty swallowing, or recurring abdominal pain should also be evaluated by a healthcare professional.
You may also find these guides helpful: Gastritis Symptoms: What Does Gastritis Pain Feel Like and Where Does It Hurt?, Gastritis vs Acid Reflux: What Is the Difference Between the Symptoms?, What Causes Abdominal Pain? Common Causes by Location, Timing and Symptoms.
Final Thoughts
Gastritis can often be managed effectively once the underlying cause is identified. Treatment may involve addressing H. pylori infection, reviewing medications, reducing stomach irritation, or using acid-reducing medicines when appropriate. Lifestyle changes can support recovery and help control symptoms, but they should not replace medical evaluation when symptoms persist. If your stomach pain keeps returning or you develop warning signs such as bleeding, severe pain, vomiting, or unexplained weight loss, seek professional medical advice.
This article is for general information and does not replace personal medical advice.
Kidney, liver and gut in Muscat: when to see an internist
Dr. James sees adults with digestive problems at Badr Al Samaa Royal Hospital, Al Ghubrah, by appointment.
Key takeaways
- Gastritis treatment depends on the underlying cause.
- H. pylori infection and certain NSAID painkillers are important causes to consider.
- Doctors may use H. pylori testing and other investigations when appropriate.
- Acid-reducing medicines may be recommended in some situations.
- If a medication is contributing to stomach irritation, your doctor can review safer alternatives.
- Avoiding personal food triggers and unnecessary NSAID use may help reduce symptoms.
- Persistent or recurrent symptoms should not be self-treated indefinitely.
Common questions
How is gastritis treated?
Treatment depends on the cause. It may include treating H. pylori infection, reviewing medicines that irritate the stomach, using acid-reducing medicines when appropriate, and making lifestyle changes that reduce stomach irritation.
Can gastritis go away on its own?
Some mild cases may improve when the underlying irritant is removed, but persistent symptoms should be evaluated. Treatment may be necessary when gastritis is caused by an infection, medication, or another medical condition.
What tests are used to diagnose gastritis?
Depending on the situation, doctors may recommend H. pylori testing, blood or stool tests, or an upper gastrointestinal endoscopy. The tests needed depend on the person's symptoms and medical history.
Do I need an endoscopy for gastritis?
Not always. Your doctor decides based on your symptoms, age and warning signs, and may recommend an endoscopy in some situations.
Is it safe to take over-the-counter antacids regularly?
Occasional use is usually fine, but frequent use should be discussed with a doctor so the cause can be found. Daily antacids can mask gastritis that needs proper treatment, especially if H. pylori or a medicine is behind it.
Sources
- NIDDK: Gastritis · niddk.nih.gov
- NHS: Indigestion · nhs.uk
This guide is for general information and does not replace a consultation. Editorial and medical review policy

More in this guide series
Abdominal Pain Causes & Gastritis: Symptoms and Treatment
What Causes Abdominal Pain? Common Causes by Location, Timing and Symptoms
Gastritis Symptoms: What Does Gastritis Pain Feel Like and Where Does It Hurt?
Gastritis vs Acid Reflux: What Is the Difference Between the Symptoms?
When Is Abdominal Pain Serious? Warning Signs You Should Not Ignore