Most stomach ulcers heal within four to eight weeks with the right combination of acid-reducing medication and, when needed, antibiotics. Treatment depends on what caused the ulcer in the first place. Roughly one in five peptic ulcers is linked to a bacterial infection called H. pylori, while most of the rest result from regular use of pain relievers like ibuprofen, naproxen, or aspirin.
Finding the Cause Before Treating
Effective treatment starts with identifying why the ulcer formed. Your doctor will typically test for H. pylori using a breath test, stool test, or blood test. If you’re over 60 with new digestive symptoms, or if you have warning signs like unexplained weight loss, difficulty swallowing, vomiting, or signs of bleeding, an upper endoscopy is recommended. During this procedure, a thin camera is passed into your stomach to directly visualize the ulcer and take tissue samples.
The cause matters because treatment paths diverge sharply. An ulcer driven by H. pylori requires antibiotics to clear the infection. An ulcer caused by pain relievers requires stopping or changing those medications. Both types need acid suppression to let the stomach lining repair itself.
Acid-Reducing Medications
Proton pump inhibitors, commonly called PPIs, are the backbone of ulcer treatment. These drugs dramatically reduce the amount of acid your stomach produces, giving the damaged tissue a chance to heal. In clinical trials, PPIs healed about 81% of ulcers within just two weeks, compared to 75% for older acid-blocking drugs. For stubborn ulcers that haven’t responded to other treatments, higher-dose PPIs heal up to 80% within four weeks and nearly 100% by eight weeks.
Older acid blockers (H2 receptor antagonists) still work, but PPIs are consistently more effective and faster. Most people take a PPI once or twice daily for four to eight weeks, depending on the ulcer’s size and location. Duodenal ulcers (in the first part of the small intestine) tend to heal faster than gastric ulcers (in the stomach itself).
Treating H. Pylori Infection
If testing confirms H. pylori, you’ll take a combination of antibiotics alongside a PPI for 10 to 14 days. The most common first-line approach in the U.S. is a four-drug regimen: a PPI taken twice daily plus bismuth (the active ingredient in Pepto-Bismol) and two antibiotics, all taken for 14 days. This sounds like a lot of pills, and it is. Expect to take medications multiple times per day during treatment.
Side effects from the antibiotics are common but usually manageable. Nausea, metallic taste, darkened stools (from the bismuth), and diarrhea are the most frequent complaints. Finishing the entire course is important because incomplete treatment can leave surviving bacteria resistant to those antibiotics, making a second round harder. After treatment, your doctor will typically retest to confirm the infection is gone, usually with a breath or stool test at least four weeks later.
If the first round fails, alternative antibiotic combinations are available. Resistance to certain antibiotics varies by region, which is one reason your doctor may choose different drug combinations depending on local resistance patterns or what you’ve already tried.
When Pain Relievers Are the Problem
If your ulcer was caused by NSAIDs like ibuprofen or naproxen, stopping the medication is the single most important step. Combined with a PPI, most NSAID-related ulcers heal completely within eight weeks.
For people who can’t stop taking NSAIDs due to chronic pain conditions or heart disease requiring low-dose aspirin, prevention becomes the strategy. Taking a daily PPI alongside the NSAID significantly reduces the risk of developing new ulcers or having a recurrence. Another option is switching to a different class of pain reliever that’s less damaging to the stomach lining. Your doctor can also prescribe a protective medication called misoprostol, which replaces the stomach’s natural protective compounds that NSAIDs deplete, though it can cause cramping and diarrhea.
Diet and Lifestyle Changes That Help
No diet alone can heal an ulcer, but what you eat and drink can either support or undermine your medical treatment. Coffee, including decaffeinated, increases stomach acid production and irritates the lining. Carbonated drinks do the same while also causing stomach distension. Alcohol directly inhibits your stomach’s natural protective mucus layer. Spicy peppers, citrus juices, and heavily processed condiments like ketchup and mustard can worsen symptoms.
Foods that support healing tend to be gentle on the stomach and rich in specific nutrients. During recovery, your body has a greater need for protein, vitamin A, zinc, selenium, and vitamin C. Good choices include:
- Fruits: apple, papaya, melon, banana
- Vegetables: dark leafy greens, carrots, beets, zucchini, green beans
- Proteins: lean beef, chicken, fish
- Healthy fats: olive oil, flaxseed, walnuts
- Fermented foods: yogurt, fermented milk
Fiber plays a particularly useful role. A diet with 20 to 30 grams of fiber per day supports healing, and probiotics from fermented foods can reduce the side effects of antibiotic treatment while potentially shortening recovery time. Vitamin C (up to 500 mg daily for three months) has shown benefits for people with H. pylori-related ulcers, both for healing and for improving iron absorption, which matters if the ulcer has caused any bleeding.
Smoking and Alcohol Raise the Stakes
Smoking does more than slow healing. It reduces the stomach’s production of protective mucus and bicarbonate while increasing acid secretion. People who smoke more than 15 cigarettes per day have a 3.5 times greater risk of a perforated ulcer compared to nonsmokers. That’s not a slightly elevated risk; it’s a dramatically different outcome.
Heavy alcohol use is equally dangerous. Drinking more than 42 alcoholic beverages per week increases the risk of a bleeding ulcer by more than fourfold. Interestingly, one large population study found that among heavy drinkers, those who consumed at least 25% of their alcohol as wine had a lower risk of bleeding ulcers than those who drank no wine at all, though the risk was still elevated compared to light drinkers. Quitting smoking and reducing alcohol consumption are two of the most impactful things you can do to prevent recurrence.
How Long Healing Takes
With proper treatment, most ulcers begin to feel better within a few days to a week as acid levels drop. Complete healing of the tissue itself takes longer. Duodenal ulcers typically close within four to six weeks. Gastric ulcers are slower, often requiring six to eight weeks. Your doctor may recommend a follow-up endoscopy after treatment to confirm the ulcer has fully healed, especially for gastric ulcers, since a small percentage of what appears to be a stomach ulcer can turn out to be something else.
Recurrence is common if the underlying cause isn’t addressed. An H. pylori infection that wasn’t fully eradicated will produce new ulcers. Continued NSAID use without stomach protection will do the same. But when the cause is eliminated and the full course of treatment is completed, most people heal completely and don’t develop another ulcer.
Warning Signs That Need Emergency Care
Most ulcers respond well to outpatient treatment, but complications can be serious. A perforated ulcer, where the ulcer erodes entirely through the stomach or intestinal wall, is a surgical emergency. The hallmark signs are sudden, severe abdominal pain that comes on like a switch being flipped, a rigid abdomen that’s painful to touch, and a rapid heartbeat. In one study of 84 patients with perforated ulcers, nearly 98% presented with sudden severe pain in the upper abdomen.
Bleeding ulcers present differently. Watch for vomiting material that looks like coffee grounds (partially digested blood), black or tarry stools, lightheadedness, or unusual fatigue. These signs mean the ulcer has eroded into a blood vessel and needs immediate attention. In these cases, endoscopy can both identify and treat the bleeding source, and high-dose acid suppression is given continuously for several days afterward.

