An ulcer is an open sore that develops when the protective lining of a tissue breaks down, exposing the layers beneath to damage. Most people searching this term are thinking of peptic ulcers, which form in the stomach or the upper part of the small intestine. About 10% of people will develop a peptic ulcer at some point in their lives, with roughly 2.8 million new cases diagnosed worldwide each year. But ulcers can also appear on the skin, typically on the legs, as a result of poor blood flow.
How a Peptic Ulcer Forms
Your stomach produces strong acid to break down food, and a thick layer of mucus normally keeps that acid from eating through the stomach wall itself. Cells in the lining also release bicarbonate, a substance that neutralizes acid right at the surface. When this defense system fails, acid and digestive enzymes start dissolving the lining, creating a crater that can extend deep into the stomach or intestinal wall.
The breakdown happens when something tips the balance between the forces that protect the lining and the forces that attack it. Once the surface layer is compromised, the deeper tissue loses its ability to produce bicarbonate, which accelerates the damage. The result is a persistent wound that doesn’t heal on its own because it’s constantly bathed in acid.
The Two Main Causes
Nearly all peptic ulcers trace back to one of two culprits: a bacterial infection or long-term use of common pain relievers.
H. pylori Infection
A spiral-shaped bacterium called Helicobacter pylori colonizes the stomach lining and triggers chronic inflammation. It also sabotages the body’s bicarbonate production, the chemical buffer that keeps acid from reaching vulnerable tissue. In duodenal ulcers (those in the upper small intestine), H. pylori bacteria cluster densely in the area and release compounds that shut down the local acid-neutralizing response. Many people carry H. pylori for years without symptoms, but in a subset of carriers, the ongoing inflammation eventually produces an ulcer.
Pain Relievers (NSAIDs)
Ibuprofen, aspirin, naproxen, and other nonsteroidal anti-inflammatory drugs work by blocking an enzyme involved in inflammation. Unfortunately, that same enzyme is responsible for producing the protective compounds that maintain the stomach’s mucus barrier, sustain blood flow to the lining, and keep acid secretion in check. Regular NSAID use strips away these defenses simultaneously. The risk increases with higher doses and longer use, and it’s compounded by taking these drugs on an empty stomach or combining them with alcohol.
What an Ulcer Feels Like
The hallmark symptom is a burning or gnawing pain in the upper abdomen, between the navel and the breastbone. The timing of the pain often signals where the ulcer is located. Stomach ulcers tend to hurt immediately after eating, and food makes the discomfort worse. Duodenal ulcers behave oppositely: pain typically starts one to three hours after a meal and often flares at night, a couple of hours after going to bed. Eating or taking an antacid usually brings temporary relief for duodenal ulcers.
Other common symptoms include bloating, nausea, loss of appetite, and feeling full quickly. Some people experience no pain at all, particularly older adults or those taking NSAIDs, which can mask the discomfort even as they cause the damage. When an ulcer bleeds, you may notice dark, tarry stools or vomit that looks like coffee grounds.
Spicy Foods Don’t Cause Ulcers
For decades, people blamed ulcers on stress and spicy food. The gastroenterology community has moved firmly past this. No large-scale study has ever found a positive association between spicy food consumption and peptic ulcer development. Capsaicin, the compound that makes chili peppers hot, may actually support the stomach lining by promoting mucus production and reducing acid secretion. Spicy foods can cause indigestion in some people, but indigestion is not the same thing as an ulcer. If spicy meals bother your stomach, it’s reasonable to cut back, but doing so won’t prevent or cure an ulcer.
How Ulcers Are Diagnosed
If your symptoms suggest an ulcer, the first step is usually testing for H. pylori. A urea breath test is one of the most common methods: you swallow a small capsule or liquid containing a tagged form of urea, and if H. pylori is present in your stomach, the bacteria break it down in a way that can be detected in your breath about 15 to 30 minutes later. This test correctly identifies the infection roughly 88% of the time and correctly rules it out about 85% of the time. Stool tests that look for H. pylori proteins are another noninvasive option.
For a direct look at the ulcer itself, doctors use an upper endoscopy, a thin flexible camera passed through the mouth into the stomach. This allows them to see the size and location of the sore, check for bleeding, and take a small tissue sample if needed. Endoscopy is particularly important for people over 55 or those with alarm signs like unexplained weight loss, difficulty swallowing, or persistent vomiting.
Treatment and Healing Timeline
When H. pylori is the cause, treatment involves a course of antibiotics combined with an acid-reducing medication. Eliminating the bacteria allows the lining to rebuild its defenses, and most ulcers heal within four to eight weeks once the infection is cleared. For NSAID-related ulcers, stopping or switching the offending drug is the most important step. Acid-suppressing medications are prescribed alongside to give the tissue time to repair.
During healing, you’ll likely take a proton pump inhibitor, a type of medication that dramatically reduces stomach acid production. This gives the exposed tissue a chance to regenerate without being constantly irritated. Most people feel significant symptom relief within a few days of starting treatment, but the ulcer itself takes weeks to fully close. Smoking slows healing and increases the chance of recurrence, so quitting during this window makes a meaningful difference.
When Ulcers Become Dangerous
Left untreated, ulcers can lead to serious complications. Bleeding is the most common, ranging from slow, chronic blood loss that causes anemia to sudden, severe hemorrhage. A perforated ulcer, where the sore erodes completely through the stomach or intestinal wall, is a surgical emergency. Stomach contents spill into the abdominal cavity, causing intense, sudden pain and rapid deterioration. Mortality rates for perforated ulcers reach as high as 30%, making prompt treatment critical.
Another complication is gastric outlet obstruction, where repeated inflammation and scarring near the junction between the stomach and small intestine narrows the passage enough to block food from moving through. Symptoms include persistent vomiting of undigested food, feeling full after eating very little, and unintentional weight loss.
Ulcers Outside the Stomach
Not all ulcers involve the digestive tract. Skin ulcers on the legs are common in people with circulation problems, and they fall into two main categories based on the type of blood vessel affected.
Venous ulcers develop when veins in the legs can’t efficiently return blood to the heart, causing fluid to pool and pressure to build. They almost always appear around the ankle, particularly near the inner ankle bone. The wound bed is typically shallow with a mix of yellowish tissue and red granulation tissue, and the surrounding skin often turns brown from iron deposits leaching out of trapped red blood cells. Swelling, itching, and flaky skin are common in the area.
Arterial ulcers result from insufficient blood supply reaching the lower extremities, usually due to narrowed arteries. These tend to form on the toes, heels, and bony areas of the foot. They look distinctly different: a “punched out” wound with sharp edges and a pale or dark base that shows little sign of healing. The surrounding skin feels cool, appears shiny, and has lost its hair. A weak or absent pulse at the ankle and slow return of color after pressing the skin are telltale signs of the reduced blood flow behind them.
Treatment for leg ulcers depends entirely on the underlying circulation problem. Venous ulcers are managed primarily with compression to counteract the pooling, while arterial ulcers require restoring blood flow, sometimes through procedures to open or bypass blocked arteries.

