An H2 antihistamine is a medication that blocks histamine receptors in the stomach to reduce acid production. Unlike the antihistamines most people associate with allergy relief, H2 antihistamines target a completely different set of receptors and treat conditions like heartburn, acid reflux, and ulcers. They’re commonly sold over the counter under brand names like Pepcid (famotidine) and are among the most widely used medications for digestive symptoms.
Why There Are Two Types of Antihistamines
Histamine is a chemical your body produces that does more than trigger allergy symptoms. It also plays a key role in stimulating stomach acid. The reason there are two classes of antihistamines comes down to the receptors histamine activates, which are located in different parts of the body and do very different things.
H1 receptors are found throughout your airways, blood vessels, and brain cells. When histamine binds to these receptors, you get the classic allergy symptoms: sneezing, runny nose, itchy eyes, hives. H1 antihistamines, like diphenhydramine (Benadryl) or loratadine (Claritin), block these receptors to relieve allergic reactions.
H2 receptors are concentrated in the cells lining your stomach that release acid. When histamine binds to H2 receptors, those cells ramp up acid production. H2 antihistamines block this signal, which means your stomach produces less acid. That’s why taking an H1 antihistamine for heartburn won’t help, and taking an H2 antihistamine for hay fever won’t do anything either. They work on entirely separate systems.
How H2 Antihistamines Work
Your stomach contains specialized cells called parietal cells that produce hydrochloric acid to help digest food. Histamine is one of the chemical messengers that tells these cells to secrete acid. H2 blockers bind to the histamine receptors on the surface of parietal cells, preventing histamine from delivering that signal. With the signal blocked, acid output drops significantly.
This makes H2 antihistamines useful for any condition where excess stomach acid causes problems. They don’t eliminate acid production entirely, since other chemical pathways also stimulate acid secretion. But they reduce it enough to relieve symptoms and allow damaged tissue in the esophagus or stomach lining to heal.
What Conditions They Treat
H2 antihistamines are primarily used for acid-related digestive conditions:
- Heartburn and acid reflux (GERD): Reducing acid output means less acid flows back into the esophagus, relieving that burning sensation in the chest.
- Peptic ulcers: Lower acid levels give stomach and duodenal ulcers a chance to heal.
- Gastritis: Inflammation of the stomach lining improves when acid production decreases.
- Excess acid conditions: Some people overproduce stomach acid, and H2 blockers help keep levels in check.
For occasional heartburn, many people take an H2 blocker as needed before a meal they expect will cause symptoms. For ulcers or more persistent reflux, they’re typically taken on a regular schedule for several weeks.
Available H2 Antihistamines
Three H2 blockers are currently FDA-approved in the United States: famotidine, cimetidine, and nizatidine. All three are available over the counter and by prescription, with prescription versions containing higher doses.
Famotidine (brand name Pepcid) is by far the most commonly used. The standard over-the-counter dose is 20 mg, taken once or twice daily. Prescription dosing can go up to 40 mg, and for certain conditions a doctor may recommend taking it at bedtime for 6 to 12 weeks to allow healing.
Cimetidine (brand name Tagamet) was the first H2 blocker developed and is still available, though it’s used less often now because it has more drug interactions than the others. It can interfere with liver enzymes that process other medications, which is a concern if you take drugs with a narrow safety margin, like theophylline for asthma.
Ranitidine (formerly sold as Zantac) was one of the most popular H2 blockers for decades but was pulled from the market in 2020 after a cancer-causing contaminant called NDMA was found to form during storage. In late 2025, the FDA approved a reformulated version of ranitidine with new manufacturing processes and strict storage requirements designed to prevent NDMA formation. The reformulated tablets must be kept in their original container, protected from moisture, and discarded within 90 days of opening.
H2 Blockers vs. Proton Pump Inhibitors
Proton pump inhibitors (PPIs) like omeprazole (Prilosec) and esomeprazole (Nexium) are the other major class of acid-reducing medications. They work further downstream in the acid production process and are generally more potent than H2 blockers. In clinical studies, PPIs reduced upper gastrointestinal bleeding by about 64% compared to H2 blockers in hospitalized patients.
That doesn’t mean PPIs are always the better choice. H2 blockers tend to work faster for on-demand relief, and they carry fewer concerns about long-term side effects. PPIs are typically reserved for more severe or persistent acid problems, while H2 blockers work well for milder or occasional symptoms. Many people start with an H2 blocker and only move to a PPI if symptoms don’t improve.
Side Effects and Safety
H2 antihistamines are generally well tolerated. The most common side effects are mild: headache, dizziness, diarrhea, or constipation. These affect a small percentage of users and usually resolve on their own.
Cimetidine stands out for having more interaction potential than other H2 blockers. It inhibits certain liver enzymes (part of the cytochrome P450 system) that metabolize many common medications. This can cause other drugs to build up in your system to higher-than-expected levels. Famotidine and nizatidine have much less effect on these enzymes, which is one reason famotidine has become the go-to H2 blocker.
Long-term use of any acid-reducing medication, including H2 blockers, can potentially affect nutrient absorption. Stomach acid helps your body absorb vitamin B12, calcium, and magnesium, so sustained acid suppression over months or years may gradually reduce levels of these nutrients. This is more of a concern with PPIs, which suppress acid more completely, but it’s worth keeping in mind if you’re taking H2 blockers daily for extended periods.
OTC vs. Prescription Strength
The same H2 antihistamines are available both over the counter and by prescription. The difference is mainly the dose and the duration of use. Over-the-counter famotidine comes in 10 mg and 20 mg tablets, intended for short-term use (up to two weeks for heartburn relief). Prescription famotidine can be dosed at 20 mg twice daily or 40 mg at bedtime, often for 6 to 12 weeks, to treat conditions like active ulcers or erosive esophagitis that need more sustained acid control.
If you find yourself reaching for OTC H2 blockers more than a couple of times a week, or if symptoms persist after two weeks of daily use, that’s a signal your condition may need a different approach or a stronger treatment plan.

