Acetaminophen (Tylenol) is the safest over-the-counter painkiller you can take with a stomach ulcer. It relieves pain without interfering with your stomach lining, unlike ibuprofen, aspirin, and naproxen, which can make an ulcer worse or cause it to bleed. Beyond acetaminophen, your options depend on the type and severity of your pain, and some require a prescription.
Why Acetaminophen Is the Go-To Choice
Acetaminophen works in the brain to reduce pain signals rather than acting on inflammation throughout the body. That distinction matters because it means the drug doesn’t disrupt the protective layer of mucus that lines your stomach. For most mild to moderate pain, it’s the simplest and safest option when you have an active ulcer.
The maximum safe dose is 4,000 milligrams per day, though some formulations (like Tylenol Extra Strength) cap their recommendation at 3,000 milligrams per 24 hours. Staying within those limits is important because acetaminophen is processed by the liver, and exceeding the daily maximum raises the risk of liver damage. If you drink alcohol regularly, your safe ceiling is even lower, so talk to your doctor about what dose is right for you.
Why NSAIDs Are Off the Table
Ibuprofen (Advil, Motrin), naproxen (Aleve), and aspirin all belong to a class of drugs called NSAIDs. They reduce pain by blocking the production of prostaglandins, which are chemical messengers involved in inflammation. The problem is that prostaglandins also play a central role in protecting your stomach. They stimulate mucus production, promote blood flow to the stomach wall, and help repair damaged tissue. When NSAIDs shut down prostaglandin production, your stomach loses those defenses.
For someone without an ulcer, this trade-off might cause nothing more than mild irritation. For someone who already has an ulcer, it can delay healing, deepen the ulcer, or trigger bleeding. Research over the past several decades has confirmed that NSAIDs both increase the likelihood of new ulcers forming and impair the healing of existing ones.
Topical NSAIDs Aren’t Necessarily Safe Either
You might assume that a topical NSAID gel or patch applied to sore muscles would skip the stomach entirely. In practice, these products still enter the bloodstream. The Mayo Clinic notes that topical diclofenac (Voltaren gel) can cause stomach or intestinal bleeding, and that having a history of stomach ulcers increases the risk. If you have an active ulcer, topical NSAIDs should be treated with the same caution as oral ones.
Prescription Options for Stronger Pain
When acetaminophen isn’t enough, your doctor has a few paths forward, each with trade-offs worth understanding.
COX-2 Inhibitors
COX-2 inhibitors are a more targeted type of anti-inflammatory. The most commonly prescribed one is celecoxib (Celebrex). Unlike standard NSAIDs, which block two forms of the enzyme involved in inflammation, celecoxib primarily blocks only the form responsible for pain and swelling while largely sparing the one that protects the stomach.
In a systematic review of clinical trials, patients taking celecoxib had a 71% lower rate of stomach ulcers detected by endoscopy compared to those on standard NSAIDs like ibuprofen or diclofenac. The rate of serious complications (bleeding, perforation, obstruction) was roughly half that of other NSAIDs, though celecoxib still carries some stomach risk and is typically prescribed alongside a stomach-protecting medication when an ulcer is present.
Opioid-Based Painkillers
Opioid painkillers like tramadol don’t damage the stomach lining through the prostaglandin pathway, which might make them seem like a safe alternative. The picture is more complicated. A large Swedish study found that tramadol was associated with roughly double the risk of a bleeding ulcer. Tramadol affects serotonin levels, which in turn can impair blood clotting. For someone with an active ulcer, impaired clotting is a real concern. Stronger opioids carry their own significant risks, including dependence, so they’re reserved for situations where other options have failed.
Stomach-Protecting Medications
If your pain condition requires anti-inflammatory treatment that goes beyond what acetaminophen can handle, your doctor will likely pair it with a proton pump inhibitor (PPI) such as omeprazole or lansoprazole. PPIs work by dramatically reducing the amount of acid your stomach produces. They keep the stomach’s pH in a safer range for 15 to 21 hours per day, which both helps existing ulcers heal and reduces the damage that anti-inflammatory drugs can do.
For PPIs to work properly, you generally need to take them on an empty stomach, 30 to 60 minutes before your first meal. Your doctor may also test you for a bacterial infection called H. pylori, which is a common underlying cause of ulcers and an independent risk factor for NSAID-related stomach damage. Treating the infection, typically with a one-week course of a PPI plus two antibiotics, significantly reduces the chance of your ulcer coming back.
If You Take Aspirin for Your Heart
Low-dose aspirin prescribed for cardiovascular protection creates a specific dilemma. Aspirin is an NSAID, so it carries stomach risks, but stopping it after a heart attack or stroke can be dangerous. Guidelines from the American College of Cardiology and the American Heart Association recommend keeping the dose at 81 mg or lower, since the risk of stomach complications rises with higher doses.
If you’ve had a bleeding ulcer while on aspirin, stopping the drug long-term is associated with higher mortality in people who need it for secondary heart protection. The standard approach is to resume low-dose aspirin as soon as possible while adding a daily PPI for stomach protection. Your doctor should also check for and treat H. pylori, since eradicating the infection in aspirin users with bleeding ulcers significantly reduces the rate of rebleeding.
Warning Signs of a Bleeding Ulcer
Regardless of which painkiller you choose, knowing the signs of ulcer bleeding can be lifesaving. Seek emergency care if you notice:
- Black or tarry stools, which indicate blood that has been digested as it passes through the intestines
- Bright red blood in vomit or vomit that looks like dark coffee grounds
- Sudden abdominal cramping or pain that feels different from your usual ulcer discomfort
- Dizziness, fainting, or unusual fatigue, which can signal significant blood loss
Severe bleeding can lead to shock, with symptoms including confusion, rapid heartbeat, cold or clammy hands and feet, pale skin, and heavy sweating. These warning signs can appear without any buildup, particularly in people taking medications that affect the stomach lining or blood clotting.

