What to Do for Ulcers: Causes, Treatment & Relief

Most peptic ulcers heal within 4 to 8 weeks with the right treatment, which almost always involves reducing stomach acid and addressing whatever caused the ulcer in the first place. The two most common causes are a bacterial infection called H. pylori and regular use of pain relievers like ibuprofen or aspirin. What you need to do depends on which cause applies to you, so getting a proper diagnosis is the essential first step.

Find Out What’s Causing It

Treatment only works well when it targets the root cause. The two major culprits, H. pylori infection and NSAID use, require completely different approaches. Your doctor will typically test for H. pylori using either a breath test or a stool test. The breath test is the more sensitive option, catching about 96% of infections, while the stool antigen test catches around 73% but is highly specific when it does come back positive. If you’ve been taking over-the-counter pain relievers regularly, that alone may explain the ulcer.

Some people have both risk factors at once. Even if NSAID use seems like the obvious trigger, testing for H. pylori is still recommended because treating the infection significantly improves healing outcomes.

Treating an H. Pylori Infection

If H. pylori is present, you’ll need a combination of antibiotics and an acid-reducing medication taken for 14 days. The current first-line recommendation from the American College of Gastroenterology is a four-drug regimen: an acid blocker taken twice daily alongside three other medications taken multiple times per day. It’s an intensive two weeks, but this approach clears the infection in the vast majority of cases.

Completing the full course matters. Stopping early because you feel better increases the chance the bacteria survive and the ulcer comes back. If the first round doesn’t work, alternative regimens are available. Notably, a previously popular three-drug combination using clarithromycin is no longer recommended as a default option because bacterial resistance has made it less reliable.

For H. pylori ulcers specifically, the antibiotic course alone heals more than 90% of ulcers without needing additional weeks of acid-suppressing medication afterward.

Acid-Reducing Medication for Healing

Proton pump inhibitors, commonly called PPIs, are the cornerstone of ulcer healing. These medications dramatically reduce the amount of acid your stomach produces, giving the damaged tissue time to repair itself. For a duodenal ulcer (in the upper part of the small intestine), the typical dose is 20 mg once daily before a meal. Gastric ulcers (in the stomach itself) generally require a higher dose of 40 mg once daily.

How long you take them depends on the ulcer’s location. Duodenal ulcers respond faster: about 84 to 86% heal within 4 weeks, and extending to 8 weeks doesn’t significantly improve that number. Gastric ulcers are slower. At 4 weeks, roughly 67% are healed. By 8 weeks, that number climbs to around 82 to 83%. Your doctor will likely recommend the longer course for a stomach ulcer.

PPIs heal ulcers more effectively than older alternatives like H2 blockers, coating agents, or misoprostol. This has been confirmed in multiple randomized trials, making PPIs the clear first choice.

If NSAIDs Are the Problem

The simplest and most effective step is to stop taking the NSAID causing the damage. Once you do, healing with a PPI follows the same timeline described above. But for many people, stopping isn’t realistic. If you take low-dose aspirin to protect against heart attack or stroke, that benefit may outweigh the ulcer risk.

Current guidelines from the European Society of Gastrointestinal Endoscopy recommend that patients taking low-dose aspirin for cardiovascular protection should not stop it permanently. If it needs to be paused briefly (for example, due to bleeding), it should be restarted within three to five days alongside a PPI. The PPI serves double duty here: healing the current ulcer and protecting against future ones for as long as you continue taking the pain reliever.

If you’ve been using over-the-counter ibuprofen or naproxen for chronic pain, talk to your doctor about alternatives. Acetaminophen doesn’t carry the same ulcer risk. For people who truly need an NSAID long-term, pairing it with a daily PPI significantly reduces the chance of another ulcer forming.

What Helps Day to Day

While your ulcer heals, a few practical changes can reduce discomfort and support recovery.

Smoking is one of the clearest lifestyle factors that slows healing. It increases both the incidence and relapse rate of ulcers, and when combined with alcohol, the risk of gastric ulcers rises substantially. Quitting smoking, or at least cutting back during treatment, gives your ulcer the best chance of healing on schedule. Alcohol independently irritates the stomach lining and worsens the damage, so reducing or eliminating it during the healing period is a practical move.

As for diet, the evidence may surprise you. The National Institute of Diabetes and Digestive and Kidney Diseases states plainly that diet and nutrition do not play an important role in causing, preventing, or treating peptic ulcers. Doctors do not recommend following a special diet or avoiding specific foods to heal an ulcer. If certain foods (spicy dishes, coffee, citrus) make your symptoms worse, it’s reasonable to avoid them for comfort. But there’s no therapeutic diet that speeds healing.

Over-the-counter antacids can provide temporary relief by neutralizing stomach acid, but they don’t heal the ulcer itself. A coating agent like sucralfate works differently: it forms a protective barrier over the ulcer site, shielding it from acid and digestive enzymes. It’s taken on an empty stomach, either one hour before or two hours after meals. Neither of these replaces a PPI, but they can help manage symptoms while your main treatment does its work.

Warning Signs That Need Urgent Attention

Most ulcers heal without complications, but a small percentage bleed, perforate, or cause a blockage. Seek emergency care if you experience any of the following:

  • Vomiting blood that looks red or resembles dark coffee grounds
  • Black, tarry stools or visible dark blood in your stool
  • Feeling faint or lightheaded
  • Sudden, severe abdominal pain
  • Difficulty breathing
  • Unexplained weight loss or a significant change in appetite

Black or tarry stools are particularly important to watch for because they indicate bleeding higher in the digestive tract, which may not cause obvious pain. If you notice this, don’t wait to see if it resolves on its own.

Preventing Recurrence

Once an ulcer heals, the goal shifts to making sure it doesn’t come back. If H. pylori was the cause and the infection was fully eradicated, recurrence rates drop dramatically. Your doctor may retest after treatment to confirm the bacteria are gone.

If NSAIDs were responsible and you need to keep taking them, long-term PPI therapy is the standard protective strategy. Avoiding unnecessary NSAID use, choosing the lowest effective dose, and never combining multiple NSAIDs all reduce your risk. Smoking cessation remains one of the most impactful things you can do, since smoking independently increases relapse rates even after successful treatment.