Stomach ulcers are sores on the stomach lining. They happen when the barrier in your stomach’s lining — called the mucosal barrier — is injured or eroded. This leads to a break in the lining, which causes open sores. Stomach ulcers are one type of peptic ulcer.
These sores can cause stomach pain, which may affect your appetite and your diet.
No conclusive research confirms that eating any specific foods can directly prevent or heal gastric ulcers. However, some foods may have a protective effect on the stomach lining, while others may be more harmful.
Need a diagnosis or prescription quickly? Optum Perks offers personalized on-demand care in as little as 15 minutes with no video or appointment required. For $25, answer a few questions online and receive a diagnosis and treatment plan from a board certified healthcare professional. Get started here.
Diet and stomach ulcers
The two main causes of stomach ulcers are bacterial infections, commonly helicobacter pylori (H. pylori), and long-term use of certain nonsteroidal anti-inflammatory drugs (NSAIDs).
A diet filled with spicy food will not cause ulcers. In fact, experts say that your diet doesn’t play any role in causing stomach ulcers, and doctors don’t recommend avoiding or including any foods in particular.
However, the pain that stomach ulcers cause can affect how and what you eat. For example, for some people, abdominal pain is worse when their stomach is empty. Others notice that pain is worse after eating.
This might mean you approach mealtimes differently while you heal. If your pain worsens when your stomach is empty, you may prefer to eat little and often rather than wait until you’re really hungry. If it’s worse after eating, you may want to stick to three full meals.
Foods to try for stomach ulcers
While doctors don’t necessarily recommend changing your diet, you may find that eating ulcer-friendly foods and drinks can help soothe the pain of stomach ulcers and allow for wound healing.
Certain foods may simply be good for your digestive system, which can promote healing, while others may reduce the risk of bacterial infections that can cause ulcers.
Some of the best foods to eat if you have a stomach ulcer include:
High fiber foods
Fiber slows digestion, reduces stomach acid concentration, and may help reduce or prevent bloating. Dietary fiber can also have a protective effect on the entire digestive system.
Some 2020 research tentatively suggested that a high fiber diet might be protective against bleeding in your digestive system caused by peptic ulcers, although the study had some limitations.
Cruciferous veggies
Eating leafy greens is great for your overall health. Cruciferous vegetables are rich in fiber and antioxidant compounds. These can support stomach health and, in some instances, prevent stomach ulcers from forming.
Cruciferous vegetables include:
- broccoli
- cauliflower
- kale
- bok choy
- arugula
- Brussels sprouts
- collard greens
- watercress
- radishes
Berries
Berries like blueberries, raspberries, strawberries, and blackberries are rich in antioxidants. Studies show that diets rich in antioxidants can reduce the risk of H. pylori infections.
More specifically, a 2020 study found that drinking cranberry juice twice per day helped suppress H. pylori infections.
Red and orange fruits and veggies
Red and orange fruits and vegetables are rich in vitamin C, which may help reduce the severity of bleeding in peptic ulcers.
Try foods such as:
- carrots
- sweet potatoes
- butternut squash
- bell peppers
- pumpkin
- mango
- Cantaloupe
Do you have an ulcer or GERD? Here’s how to tell the difference.
Fermented foods
Many fermented foods, such as sauerkraut and yogurts, are rich in probiotics which may help eradicate H. pylori when combined with antibiotics. This may help prevent stomach ulcers from developing.
Probiotics are live microbes that help support the healthy working of your gut bacteria.
What foods to avoid with a stomach ulcer
Foods can’t cause stomach ulcers. However, too much acid in the stomach can lead to damage to the stomach lining, which may increase the risk of developing ulcers.
Some foods may also make stomach pain worse if you have ulcers.
Spicy foods
Spicy foods, such as hot sauces and chili pepper-based dishes, could cause discomfort, bloating, and pain, whether you have an ulcer or not. This means it could aggravate your ulcer and make your symptoms worse for some time.
Caffeinated drinks
A morning cup of tea or coffee might help you feel ready to face the day. But it may not be good for your stomach ulcer.
Caffeinated beverages increase acid production in your gut, which may worsen your stomach pain.
Acidic fruits
Lemons, limes, oranges, tomatoes, and grapefruits are very acidic. This means eating them could irritate your stomach ulcer.
Alcohol
Any form of alcohol increases acid production in your gut, promotes inflammation in the body, and may damage your stomach lining further.
Stomach ulcer treatment options
The main goal of treatment for stomach ulcers is to reduce the acidity in the stomach, which allows the stomach lining to heal.
Doctors generally prescribe medications to help reduce stomach acid production. These include:
- proton pump inhibitors
- lansoprazole (Prevacid)
- omeprazole (Prilosec)
- pantoprazole (Protonix)
- rabeprazole (AcipHex)
- esomeprazole (Nexium)
- H2 blockers
If you need help covering the cost of medications, the free Optum Perks Discount Card could help you save up to 80% on prescription drugs. Follow the links on drug names for savings on that medication, or search for a specific drug here.

Free prescription coupons
Seriously … free. Explore prices that beat the competition 70% of the time.
Get free cardOnline care for stomach ulcers
Experts now believe that your diet can’t cause or cure your ulcers. This means seeking the right medical treatment is essential to manage stomach ulcers.
Online care services, including Optum Perks Online Care, may make getting treatment easier. With these services, you can submit an online form answering a few questions about your symptoms, and a licensed healthcare professional will respond soon after to prescribe a treatment plan — without the need to make an in-person appointment.
Summary
Doctors don’t necessarily recommend changing your diet to treat stomach ulcers. But certain foods, including berries and high fiber foods, may help promote healing and reduce symptom aggravation, while others — such as alcohol and caffeine — may worsen your symptoms.
You may also find changing how and when you eat can help ease your symptoms. You may find that eating lots of smaller meals can reduce your pain, or you may prefer sticking to fewer big meals.
If you think you have a stomach ulcer, it’s a good idea to speak with a doctor. Healthcare professionals can help you to create a treatment plan that works for you.
Download the free Optum Perks Discount Card to save up to 80% on some prescription medications.
