Stomach ulcers are open sores that develop in the lining of the stomach when its protective mucus barrier breaks down and acid eats into the tissue beneath. About 10% of people will develop a peptic ulcer at some point in their lives. The two dominant causes are a bacterial infection called H. pylori and the regular use of common pain relievers, but several other factors play a role.
H. pylori: The Most Common Cause Worldwide
Helicobacter pylori is a spiral-shaped bacterium that burrows into the mucus lining of the stomach and survives in an environment that would kill most other organisms. Once established, it triggers chronic inflammation, weakens the protective mucus layer, and allows stomach acid to damage the tissue underneath. Many people carry H. pylori for years without symptoms, but in a significant percentage of carriers the infection eventually leads to an ulcer.
H. pylori spreads through contaminated water, food, or close person-to-person contact, and infection rates are highest in regions with crowded living conditions or limited sanitation. Treatment involves a combination of antibiotics and acid-reducing medication, but this is becoming more complicated. Resistance to clarithromycin, one of the most commonly used antibiotics for H. pylori, has risen from about 29% of tested strains during 2015 to 2019 to nearly 37% during 2020 to 2023. Resistance rates also vary wildly by country, from as low as 1% in Venezuela to over 80% in Australia. This means your doctor may need to test which antibiotics will actually work before prescribing a regimen.
Pain Relievers That Damage the Stomach Wall
Nonsteroidal anti-inflammatory drugs, commonly called NSAIDs, are the second leading cause of stomach ulcers. This group includes ibuprofen, naproxen, and aspirin. These medications work by blocking enzymes called COX-1 and COX-2, which are involved in producing chemicals that trigger pain and inflammation. The problem is that those same chemicals also help maintain the stomach’s protective lining.
When COX-1 is blocked, blood flow to the stomach wall drops. When COX-2 is blocked, white blood cells start sticking to blood vessel walls in the stomach, causing local inflammation. Neither effect alone is enough to cause serious damage, but when both enzymes are suppressed at once, the combination produces bleeding erosions in the stomach lining. That’s exactly what traditional NSAIDs do: they inhibit both COX-1 and COX-2 simultaneously.
Newer pain relievers designed to target only COX-2 (sometimes called “selective” NSAIDs) carry substantially lower ulcer risk. In clinical trials, selective COX-2 inhibitors reduced the rate of upper digestive tract ulcers, perforations, and bleeds by roughly 50% compared to traditional NSAIDs. Some trials found their ulcer rates were statistically no different from a placebo. Still, even these drugs aren’t completely risk-free, particularly for people who take them long-term or who have other risk factors.
The risk from NSAIDs climbs with higher doses, longer use, older age, a history of prior ulcers, and combining NSAIDs with blood thinners or corticosteroids. Taking an occasional ibuprofen for a headache is unlikely to cause an ulcer, but daily use over weeks or months is a different story.
Smoking, Alcohol, and Stress
Smoking interferes with the stomach’s ability to protect and repair itself. It reduces the production of bicarbonate-rich saliva, which normally helps neutralize acid. It also impairs blood flow to the stomach lining, slowing the healing of any damage that does occur. Smokers who already have an H. pylori infection or who take NSAIDs face a compounded risk.
Alcohol has a direct toxic effect on the mucous membranes of the digestive tract, making them more vulnerable to acid damage. Heavy drinking is considered a triggering factor for ulcer-related problems rather than a standalone cause, meaning it tends to worsen damage from other sources rather than creating ulcers on its own.
Psychological stress has a more complicated relationship with ulcers than most people realize. For decades after the discovery of H. pylori in the 1980s, medical authorities largely dismissed stress as a cause of ulcers. But a large prospective study of a Danish population found that psychological stress independently increased the risk of developing peptic ulcers, even after accounting for H. pylori infection, NSAID use, smoking, and socioeconomic status. Stress appeared to raise ulcer risk partly by influencing health behaviors (more smoking, more drinking, poorer diet) and partly through its own direct effects. So while stress alone probably won’t give you an ulcer, it’s a genuine contributing factor, not just folklore.
Rare Causes: When the Body Overproduces Acid
A small number of stomach ulcers result from conditions that cause the stomach to produce far more acid than normal. The best known is Zollinger-Ellison syndrome, caused by tumors called gastrinomas that secrete large amounts of a hormone called gastrin. Gastrin stimulates the stomach’s acid-producing cells to multiply and work overtime, flooding the digestive tract with acid. This leads to severe, often multiple ulcers that don’t respond well to standard treatment. Zollinger-Ellison syndrome is rare, but it’s worth investigating when ulcers keep coming back despite appropriate treatment or when they appear in unusual locations.
Spicy Food: A Persistent Myth
Many people assume spicy food causes ulcers, but the evidence tells a more nuanced story. Capsaicin, the compound that makes chili peppers hot, has actually been shown in research to promote ulcer healing, prevent stomach mucosal damage, and even inhibit the growth of H. pylori at normal dietary doses. In lab studies, low doses of capsaicin protected the stomach lining against damage from alcohol and aspirin.
The catch is dose. At very high concentrations, capsaicin can worsen existing damage from alcohol or aspirin rather than prevent it. In practical terms, eating spicy food in normal amounts does not cause stomach ulcers and may even be mildly protective. If you already have an ulcer, though, spicy food can irritate the raw tissue and make symptoms feel worse, which is likely where the myth originated. The burning sensation is real, but it’s irritation of an existing problem, not the creation of a new one.
Why the Cause Matters for Treatment
Identifying the specific cause of a stomach ulcer determines how it’s treated. An ulcer driven by H. pylori won’t heal permanently until the infection is eradicated. An ulcer caused by NSAIDs requires stopping or switching the medication. And an ulcer that keeps recurring despite standard treatment may point toward something less common, like Zollinger-Ellison syndrome, that requires different testing entirely.
In many countries, the balance of ulcer causes is shifting. As H. pylori rates decline in developed nations due to improved sanitation and widespread treatment, NSAIDs have become an increasingly dominant cause. This shift matters because NSAID-related ulcers tend to occur in older adults who take these drugs for chronic pain or heart protection, and these patients are often at higher risk for serious complications like bleeding.