Stomach ulcers

Your stomach produces strong acids to help digest the food you eat and kill off harmful bacteria. Your stomach lining is protected from this acid by a layer of mucus. Stomach ulcers (also called “gastric ulcers”) are painful sores that develop when this protective mucus layer is damaged or reduced, allowing the stomach acid to eat away at the stomach lining.

Middle-aged couple walkingMiddle-aged couple walkingYoung man enjoying a salad

Causes and risk factors for stomach ulcers

What causes stomach ulcers?

There are two main causes of stomach ulcers:

  • H pylori infection: H pylori is a type of bacteria that can live on your stomach and intestinal lining. Many people have H pylori without experiencing any symptoms. However, H pylori can cause inflammation and lead to ulcers.
  • Regularly taking nonsteroidal anti-inflammatory drugs (NSAIDs): Over-the-counter NSAIDs like ibuprofen (Motrin), naproxen (Aleve) and aspirin are commonly used to relieve pain. However, taken regularly, they can irritate your stomach lining and cause ulcers.

Rarely, stomach ulcers can be caused by an inherited condition known as Zollinger-Ellison syndrome. This condition increases your body’s production of stomach acid, causing ulcers. However, it causes less than 1% of stomach ulcers.

Stress and diet do not cause ulcers. Doctors used to think that stress and diet (specifically eating lots of spicy or acidic foods) caused stomach ulcers, but this is not true.

Although stress and spicy foods do not cause ulcers, they can make your symptoms worse and slow down the healing process.

What are additional risk factors for stomach ulcers?

Several factors can increase your chance of developing stomach ulcers, although none of these factors alone causes ulcers. Risk factors for developing stomach ulcers include:

  • Smoking: Smoking can irritate your stomach lining and make it more likely that you develop a stomach ulcer related to H pylori infection.
  • Drinking alcohol: Drinking lots of alcohol can also irritate your stomach lining. It can also cause your stomach to produce more acid.
  • Taking medications along with NSAIDs: Using NSAID pain relievers can sometimes cause ulcers. If you also take medications like selective serotonin reuptake inhibitors (SSRIs), steroids, anticoagulants, alendronate (Fosamax) or risedronate (Actonel), you have a significantly greater risk of developing ulcers.

What are the symptoms of stomach ulcers?

Symptoms can vary

Each person’s symptoms may vary. In some cases, ulcers don’t cause any symptoms.

If you do have symptoms, they may include:

  • Dull, gnawing or burning stomach pain.
  • Feeling full easily.
  • Pain that radiates from your stomach to your back or chest.
  • Stomach pain located in the upper-middle part of the abdomen (above the belly button and below the breastbone).
  • Stomach pain that gets worse in between meals or at night and gets better after eating or drinking something.
  • Symptoms of indigestion and heartburn, like a burning feeling in your chest.
  • Loss of appetite or not wanting to eat because of the pain.
  • Nausea or vomiting.

Symptoms in severe cases

In more severe cases, stomach ulcer symptoms may include:

  • Anemia, which means your blood can’t carry enough oxygen. Anemia symptoms include tiredness, looking pale, feeling short of breath.
  • Stools that are dark, sticky or tarry (which may indicate the presence of old blood).
  • Vomit that is bloody or looks like coffee grounds.
  • Weight loss.

If you have any of these symptoms, see your provider immediately. They may indicate a bleeding stomach ulcer, which can become life-threatening.

How are stomach ulcers diagnosed?

If you have symptoms of a stomach ulcer, you should talk to your doctor. They will ask you about your medical history and current medications and perform a physical exam.

If your doctor suspects a stomach ulcer, they will start by testing you for H pylori infection. This can be done through a blood test, stool test or breath test. For a breath test, you will drink a specific drink containing a special form of carbon. H pylori will break down this carbon in your stomach.

Later, you will breathe into a plastic bag and seal it. Your breath sample will contain radioactive carbon in the form of carbon dioxide.

Imaging tests used to diagnose ulcers include:

  • Barium swallow: You will drink a thick liquid (barium) that coats your esophagus, stomach and the first part of your small intestine. You will then have an x-ray taken. The barium helps your doctor see your intestines and check for ulcers.
  • Upper endoscopy: Your doctor will insert a thin, flexible tube with a camera at the end through your mouth and into your throat. Your doctor will thread the tube through your esophagus and stomach, examining the lining for ulcers. Your doctor can also take a small sample of tissue (a biopsy) to check for H pylori.

How are stomach ulcers treated?

Medication and non-surgical treatment

For small and uncomplicated ulcers, medication is usually the first line of treatment. Your doctor may prescribe one or more of the following medications:

  • Antibiotics: If H pylori is the underlying cause of your ulcer, your doctor will prescribe you a combination of antibiotics to kill the bacteria. You may start feeling better after just a few days of taking your antibiotics, but you should continue to take them until you finish your prescription to make sure to eliminate all of the bacteria. Antibiotics are often prescribed along with proton pump inhibitors.
  • Proton pump inhibitor medications: These medications block acid production in your stomach giving the ulcers time to heal.
  • H2 receptor blockers: These medications also reduce acid production.
  • Protectants: Protectants like sucralfate (Carafate) and misoprostol (Cytotec) cover the ulcer and protect it from enzymes and acids while it is healing.
  • Bismuth supplement: Bismuth supplements have an antimicrobial effect against H pylori, preventing it from coming back.

In addition to the above treatments, your doctor may recommend:

  • Stopping all use of NSAIDs: Taking NSAIDs frequently can cause ulcers. If you need to take NSAIDs for another medical condition, talk to your doctor. They may suggest lowering your dose, taking the medication with a meal and quitting smoking.
  • Follow up: Your doctor may recommend that you come in for a follow-up endoscopy so that they can evaluate how well you are healing and if additional treatment is needed.

With the right treatment, your symptoms should start to go away within a few days or weeks. However, it takes longer for the actual ulcer to heal, often between one and three months.

Surgical treatment

Stomach ulcer surgery is usually not needed, as medications tend to be highly effective. It is only recommended in severe cases, such as when:

  • The ulcer fails to heal with treatment.
  • The ulcer comes back repeatedly (ulcer recurrence).
  • The ulcer is bleeding.
  • The ulcer has caused a tear in the stomach.

The exact nature of the surgery will depend on the situation. For a bleeding ulcer, you will need emergency surgery to stop the bleeding, which usually involves locating and tying off the source of the bleeding. Your doctor may perform a therapeutic endoscopy, in which an endoscope is used to fix the bleed. This is less invasive than traditional surgery.

For people with Zollinger-Ellison syndrome, the body produces too much stomach acid. This can prevent ulcers from healing or cause recurrence. If other treatments aren’t working, your doctor may recommend surgery to cut off the nerve supply to the stomach, which reduces acid production. However, this kind of surgery comes with many risks and complications. Be sure to talk to your doctor about what options you have and what might be right for you.

What should I be eating while my ulcer heals?

While your stomach ulcer is healing, you may wonder what you can and cannot eat. There is no hard and fast rule for this. In general, it is good to eat a diet rich in fiber, fruits, vegetables and whole grains. Probiotic-rich foods like yogurt and sauerkraut may also be helpful.

Certain foods can make your symptoms worse. You may want to limit or avoid:

  • Acidic foods.
  • Alcohol.
  • Caffeine.
  • Fatty or greasy foods.
  • Milk.
  • Spicy foods.

Of course, everyone has a different reaction to the food they eat. Be sure to listen to your body and adjust your diet according to how certain foods affect your symptoms.

Lifestyle changes to consider

You cannot prevent stomach ulcers by changing your lifestyle or diet. However, there are some lifestyle changes that may help.

  • Eating a healthy diet. There is no special “stomach ulcer diet.” However, it’s generally a good idea to eat a diet high in fruits, vegetables, whole grains and fibers. You may also want to incorporate more probiotic-rich foods, like yogurt, miso and sauerkraut into your diet. These foods contain lots of ‘good bacteria’ that can keep other bacteria, like H pylori, in check.
  • Quitting smoking. Smoking can lead to inflammation of the stomach lining and prevent an ulcer from healing. If you don’t smoke, don’t start. If you do smoke, try joining a smoking cessation program.
  • Reducing alcohol consumption.
  • Reducing your stress. This is easier said than done. However, stress can reduce your immune system’s ability to fight off infection and slow down your healing. Try to reduce stress by getting a good night’s sleep, practicing regular exercise, trying things like yoga or just going for a walk.

FAQs about stomach ulcers

What is a stomach ulcer?

A stomach ulcer (also known as a gastric ulcer), is an open sore that forms on the lining of the stomach when the protective layer is eroded by gastric acid, causing abdominal pain and possible bleeding. It is a type of peptic ulcer disease.

What causes stomach ulcers?

The most common cause of stomach ulcers is an infection from a bacteria called Helicobacter pylori (H. pylori), which weakens the stomach’s protective lining. Other causes include the long-term use of nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen and aspirin, which can irritate the stomach and increase the risk of ulcer formation. While other factors like excessive alcohol consumption, smoking and stress don’t directly cause stomach ulcers, they may increase the chance of developing stomach ulcers.

What are the symptoms of a stomach ulcer?

The most common symptom of a stomach ulcer is a burning sensation or pain in the middle of your abdomen between your chest and belly button. Other symptoms can include poor appetite, weight loss, bloating, burping, nausea, vomiting, and in severe cases, dark or black stool, or vomiting blood.

How are stomach ulcers diagnosed?

Stomach ulcers are often diagnosed through an endoscopy, where a long tube with a camera is inserted through the mouth into the stomach to visualize the ulcer. Other tests include blood tests, breath tests or stool tests to check for H. pylori infection.

What is the treatment for stomach ulcers?

Stomach ulcers are typically treated with antibiotics to kill the H. pylori bacteria, along with other drugs such as PPI’s and H2 blockers to reduce stomach acid and protect your stomach lining. Lifestyle changes, like quitting smoking and reducing alcohol consumption, may also be recommended.

Can stomach ulcers lead to complications?

Yes, if left untreated, stomach ulcers can lead to serious complications such as bleeding, perforation (a hole through the wall of the stomach) and gastric obstruction (blockage in the stomach causing vomiting and weight loss).

Are stomach ulcers curable?

Yes, most stomach ulcers are curable with proper treatment, which includes the use of medications to kill bacteria, reduce stomach acid and protect the lining of the stomach.

How long do stomach ulcers take to heal?

Stomach ulcers typically take about 4 to 8 weeks to heal with appropriate medical treatment, but the healing time can vary depending on individual factors and the severity of the ulcer.

Can diet affect stomach ulcers?

While spicy food or a poor diet is not a direct cause of stomach ulcers, certain foods and drinks can aggravate your ulcer and worsen symptoms. These can include coffee, alcohol and foods that are spicy, acidic or high in fat. A balanced, nutritious diet can help your ulcer heal and prevent future ulcers.

Can stress cause stomach ulcers?

Stress doesn’t cause ulcers, but it can exacerbate them and make them more difficult to heal. Chronic stress can increase the production of your stomach acid, which can then irritate your ulcer.

Can stomach ulcers become cancerous?

While most stomach ulcers are benign, a small percentage can become cancerous. This is why it’s important to get an ulcer evaluated and treated promptly. If you have an ulcer that doesn’t heal with treatment, your doctor may recommend a biopsy to rule out cancer.


The National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Symptoms & Causes of Peptic Ulcers (Stomach Ulcers) (

American College of Gastroenterology. Peptic Ulcer Disease (

Medline Plus: The National Library of Medicine. Peptic Ulcer (