A hurting cavity usually responds well to a combination of over-the-counter pain relievers, and you can get meaningful relief within 30 to 60 minutes. The fastest approach is taking ibuprofen and acetaminophen together, which outperforms even prescription opioids for dental pain. But pain relief is temporary. What you do in the next few days to protect the tooth and get professional treatment determines whether the pain stays manageable or escalates into something serious.
Why a Cavity Hurts
Your teeth have a hard outer shell of enamel protecting a soft core called the pulp, which contains nerves, blood vessels, and connective tissue. A cavity is a hole created by acid-producing bacteria that slowly eat through that enamel. When the decay is shallow, you might feel nothing at all. Once it reaches the layer just beneath the enamel, called dentin, you start noticing sensitivity to hot, cold, or sweet foods.
If the cavity deepens enough to irritate or reach the pulp, the nerve tissue becomes inflamed, a condition called pulpitis. This is what causes that deep, throbbing pain that can wake you up at night. Early-stage pulpitis is reversible: treat the cavity, and the inflammation calms down. But if the decay reaches the pulp directly, the damage may become permanent, and the tooth may eventually need a root canal or extraction rather than a simple filling.
The Best Over-the-Counter Pain Relief
The most effective approach is combining two medications: 400 mg of ibuprofen (Advil, Motrin) with 500 mg of acetaminophen (Tylenol), taken at the same time. A 2025 study in The Journal of the American Dental Association found this combination controlled dental pain better than hydrocodone (an opioid), with fewer side effects and better sleep. The two drugs work through different pathways, so together they cover more ground than either one alone.
You can repeat this combination every six hours. Ibuprofen also reduces inflammation around the tooth, which addresses part of the underlying problem rather than just masking pain. If you can only take one, ibuprofen is generally the better choice for dental pain because of that anti-inflammatory effect. Avoid aspirin if the area is bleeding, since aspirin thins blood and can make things worse.
Topical Options That Numb the Area
Numbing gels containing benzocaine (sold as Orajel and similar brands) can be applied directly to the gum around the painful tooth for fast, localized relief. A small amount rubbed onto the area starts working within a minute or two. These gels are meant for short-term use only. Reapply as directed on the packaging, and avoid using them continuously for more than a few days.
Clove oil is a natural alternative that performs surprisingly well. A clinical trial found it was as effective as benzocaine at numbing oral tissue. To use it, dab a small amount onto a cotton ball and hold it against the sore tooth or surrounding gum for a minute. Use it sparingly, though. Clove oil contains a compound called eugenol that can irritate or damage gum tissue, tooth pulp, and soft tissues inside the mouth with repeated use.
Saltwater Rinses and Cold Compresses
A warm saltwater rinse helps reduce bacteria around the cavity and calms inflamed tissue. Mix one teaspoon of salt into eight ounces of warm water. If that stings too much, cut the salt to half a teaspoon for the first day or two. Swish gently for 30 seconds and spit. You can repeat this several times a day, especially after eating, to keep the area clean.
A cold compress on the outside of your cheek (15 minutes on, 15 minutes off) constricts blood vessels in the area and reduces swelling. This is especially helpful if you notice any puffiness around the jaw.
Why It Hurts More at Night
If your cavity pain seems to flare up when you lie down, you’re not imagining it. When you recline, blood flow to your head increases slightly, creating more pressure around inflamed or infected tissue. Propping yourself up with an extra pillow or two keeps your head elevated and reduces that pressure. Taking your pain reliever about 30 minutes before bed also helps you get ahead of the nighttime spike.
Foods and Drinks That Make It Worse
Certain foods aggravate a painful cavity far more than others. The obvious triggers are very hot and very cold items, but the list goes further than temperature:
- Citrus fruits and juices (oranges, lemons, pineapple, grapefruit) are highly acidic and can cause sharp pain on contact with exposed dentin.
- Tomatoes and tomato sauce carry enough acid to trigger sensitivity.
- Soda, both regular and diet, contains phosphoric and citric acids that lower the pH in your mouth and can erode enamel further.
- Ice cream and sugary drinks combine cold temperature with sugar, both major triggers.
- Hard and sticky candy can chip a weakened tooth or lodge in the cavity itself, pressing directly on exposed nerves.
Stick to lukewarm, soft, neutral foods while you’re managing the pain. Chew on the opposite side of your mouth when possible.
Can You Reverse Early Decay?
If the cavity is still in its earliest stage, where the enamel is weakened but hasn’t yet formed a true hole, fluoride treatments can actually reverse the damage. Fluoride gets absorbed by demineralized enamel more readily than by healthy enamel, helping rebuild the mineral structure that bacteria have started to dissolve. Your dentist can apply a high-concentration fluoride varnish, and using a fluoride toothpaste or rinse at home supports that process between visits.
Once the decay has broken through the enamel and formed an actual cavity, though, no amount of fluoride will close that hole. At that point, the tooth needs a filling, crown, or more extensive treatment depending on how deep the damage goes. The pain you’re feeling is your tooth telling you the clock is ticking.
Signs the Problem Is Getting Worse
Cavity pain that responds to over-the-counter medication and comes and goes with triggers like food and temperature is uncomfortable but not dangerous in the short term. Certain symptoms signal that the decay has progressed to an infection or abscess, which requires prompt treatment:
- Fever combined with facial swelling indicates the infection may be spreading beyond the tooth.
- Swelling in your jaw, neck, or under your chin suggests the infection is moving into surrounding tissue.
- Difficulty breathing or swallowing means the infection has potentially spread to your throat or neck, and you should go to an emergency room.
- Pain that no longer responds to medication or that becomes constant and severe often means the pulp is dying or already dead.
A tooth abscess won’t resolve on its own. Antibiotics can slow the infection temporarily, but the source of the problem inside the tooth needs professional treatment to fully clear.

