When You Have an Ulcer: Foods to Eat, Foods to Avoid

Page content

Fruits and Vegetables

If you’re wondering what to eat when you have an ulcer, a wide variety of fruits and vegetables should be first on your list. The fiber in most fruits and vegetables can help heal an ulcer and can also reduce your risk of getting another one.

Specifically, focus on fruits and vegetables that contain antioxidants and flavonoids. Foods that contain antioxidants include blueberries, cherries, tomatoes, squash and bell peppers. Foods that contain flavonoids include apples, cranberries, onions, celery and garlic. Flavonoids can help reduce the growth of H. pylori, which causes some ulcers. Foods that are high in B-vitamins and calcium, such as almonds, beans, spinach, kale, and other dark leafy greens, can also be helpful when you have an ulcer.

Whole Grains

Whole grains are beneficial in any healthy diet plan, but if you have an ulcer, whole grains can provide even more benefits. Whole grains contain both fiber and B-vitamins, both of which can be important components in healing an ulcer. Avoid refined grains, such as foods made from white flour and white rice, and limit your sugar intake as well.


When you have an ulcer, red meat (especially the types that are high in fat) can exacerbate your symptoms. Instead, try to use lean meats and poultry, cold-water fish, tofu and soy, or beans as your main sources of protein.

Beverages and Caffeine

Make sure to avoid drinking beverages such as coffee (regular or decaf), carbonated drinks, and alcohol. These beverages can irritate the lining of your stomach and stimulate additional acid production, both of which can aggravate the symptoms of an ulcer. Focus on drinking water instead, preferably at least six cups each day.

Spicy Foods

Avoid eating spicy foods as much as possible, as these may aggravate ulcer symptoms in some people as well. Spices to particularly avoid include chili powder, mustard seed, nutmeg, black pepper, and cocoa. (You may want to avoid chocolate as well.)

General Tips

The following are some general tips that can help you control your ulcer symptoms:

  • If you’re trying to figure out what to eat when you have an ulcer, you may want to try an elimination diet. At first, avoid all of the foods mentioned above. Then slowly introduce the foods one by one back into your diet, watching to see when the foods appear to aggravate the symptoms.
  • Alternatively, keep a food diary, listing all of the different foods that you’ve eaten, as well as the times when you feel abdominal pain. After several days, analyze the diary entries to see whether you find a pattern. For example, spicy food does not bother all people who have ulcers, and you can figure out whether it bothers your ulcer by looking back at your diary for the spicy foods you’ve eaten recently.
  • If you are eating or drinking something that you are afraid may affect your ulcer, try to consume it only in small amounts, and with another food to buffer its effects.
  • Eat small meals frequently throughout the day to minimize ulcer pain.


The College of Family Physicians of Canada

University of Maryland Medical Center