Last Updated February 2021 | This article was created by familydoctor.org editorial staff and reviewed by Peter Rippey, MD, CAQSM

What is an ulcer?

Ulcers are sores on the lining of your stomach or small intestine. Sores also could be on your esophagus (throat). Most ulcers are located in the small intestine. These ulcers are called duodenal ulcers. Stomach ulcers are called gastric ulcers. Ulcers in the throat are called esophageal ulcers.

Symptoms of an ulcer

Common ulcer symptoms include:

  • Discomfort between meals or during the night (duodenal ulcer)
  • Discomfort when you eat or drink (gastric ulcer)
  • Stomach pain that wakes you up at night
  • Feel full fast
  • Bloating, burning or dull pain in your stomach
  • Comes and goes days or weeks at a time
  • The discomfort lasts for minutes or hours

If your ulcer becomes perforated (torn), it becomes a bleeding ulcer. This can cause the following symptoms:

  • Nausea
  • Vomiting blood
  • Unexpected weight loss
  • Blood in your stool or dark stools
  • Pain in your back

What causes an ulcer?

Most ulcers are cause by Heliocobacter pylori (H. pylori). This is a bacterial infection. Acids from the foods we eat can make the pain and discomfort worse. Long-term use of aspirin or anti-inflammatory medicines (ibuprofen) are also a common cause of ulcers. Stress and spicy foods can make an ulcer worse.

How is an ulcer diagnosed?

Your doctor will ask you about your symptoms. They may do an endoscopy. This procedure involves inserting a thin, flexible tube attached to a camera down your throat and into your stomach. Your doctor will test your blood, breath or stool for H. pylori. They also can test a sample of your stomach lining. Your doctor also will ask you if you regularly take aspirin or anti-inflammatory medicines.

Can an ulcer be prevented or avoided?

You cannot prevent an ulcer caused by an H. pylori infection. However, you can reduce your risks by limiting aspirin and anti-inflammatory medicines. Avoid foods that are acidic (orange juice) and spicy to reduce discomfort. Avoid caffeine and alcohol.

Ulcer treatment

Your doctor will give you an antibiotic medicine to treat an H. pylori infection. You will have to take it for 2 to 3 weeks. Your doctor also might suggest triple therapy. This is a combination of 2 antibiotics and a protein pump inhibitor (PPI). Your doctor might suggest medicines to reduce stomach acids. You may have to take these for up to 8 weeks. Several other medicines can be used to help treat ulcers. Two types of medicines (H2 blockers and PPIs) reduce the amount of acid that your stomach makes. Over-the-counter antacid medicine provides temporary relief. Smoking and alcohol make the discomfort worse. In severe cases, you may need surgery. Ulcers get worse without treatment. If aspirin and anti-inflammatory medicine irritates your stomach, your doctor may suggest the medicine, misoprostol.

Living with an ulcer

If you have an ulcer, avoid the things that make your ulcer pain worse. This means to avoid spicy foods, alcohol and smoking. If you have to take aspirin or ibuprofen for chronic pain, talk to your doctor. He or she may suggest an alternative. Keep your diet balanced. Try eating small, frequent meals when you’re having pain.

Questions to ask your doctor

  • How can I tell the difference between an ulcer and the stomach flu?
  • Where is my ulcer located?
  • Am I at risk of getting multiple ulcers?
  • What are the side effects of ulcer medicines?
  • Are ulcers a sign of another health condition?