The fastest way to get rid of a bad headache depends on what type you’re dealing with, but a combination of over-the-counter pain relief, a cold compress, hydration, and rest in a dark room will resolve most headaches within 30 minutes to two hours. Knowing which kind of headache you have helps you pick the right approach and avoid making it worse.
Figure Out What Kind of Headache You Have
Most bad headaches fall into one of two categories: tension headaches and migraines. They feel different, respond to different treatments, and last different amounts of time.
A tension headache produces a pressing or tightening sensation on both sides of your head, like a band squeezing around your skull. The pain is mild to moderate, doesn’t pulse, and doesn’t get worse when you move around. There’s no nausea. These headaches can last anywhere from 30 minutes to several days.
A migraine is more intense. The pain is often on one side, throbs or pulses, and gets worse with physical activity. You’ll typically have at least one of these: nausea, sensitivity to light, or sensitivity to sound. Some people see flickering lights, spots, or experience tingling before the headache starts. That’s called an aura and can last 5 to 60 minutes. Migraines last 4 to 72 hours without treatment. A quick way to screen yourself: if you have light sensitivity, nausea, and your headache limits your normal activities, it’s likely a migraine.
A third, less common type is a cluster headache. These cause severe pain around one eye or temple, often with a watery eye, runny nose on the same side, or a drooping eyelid. They hit hard and fast, lasting 15 minutes to 3 hours, and can strike multiple times a day. Cluster headaches generally need prescription treatment.
Take the Right Pain Reliever
For a tension headache, ibuprofen or acetaminophen both work well. Ibuprofen can be taken every 6 to 8 hours, up to 4 doses in 24 hours. Acetaminophen can be taken every 4 to 6 hours, up to 5 doses in 24 hours. Ibuprofen also reduces inflammation, which makes it slightly more effective for headaches involving muscle tension in the neck and scalp. Avoid ibuprofen if you have kidney problems or a sensitive stomach.
For migraines, ibuprofen or naproxen tend to work better than acetaminophen because they target the inflammatory process behind migraine pain. The key is timing: take your pain reliever as early as possible. Waiting until the pain is severe makes any medication less effective.
Adding caffeine gives pain relievers a measurable boost. A Cochrane review found that combining caffeine with a standard pain reliever helps an additional 5% to 10% of people reach meaningful pain relief compared to the medication alone. A cup of coffee or tea alongside your ibuprofen or acetaminophen is a simple way to take advantage of this. Just don’t rely on caffeine if you’re sensitive to it or if it’s late in the day, since poor sleep will make headaches worse.
Apply a Cold Compress
Cold therapy is one of the most effective non-drug treatments for headaches, especially migraines. Placing a cold pack on your forehead, temples, or the back of your neck constricts blood vessels, reduces the release of inflammatory chemicals, and creates a competing sensation that interrupts pain signals traveling to the brain. Apply cold for no more than 20 minutes at a time, with a thin cloth between the pack and your skin. You can repeat this several times throughout the day.
For tension headaches, heat sometimes works better. A warm towel on the back of the neck and shoulders raises your pain threshold and relaxes tight muscles. If you’re not sure which type you have, try cold first. It’s more broadly effective.
Hydrate, but Slowly
Dehydration is one of the most overlooked headache triggers. If you haven’t been drinking enough water, especially after exercise, alcohol, or a long stretch in heat, your headache may partially or entirely resolve with fluids alone. Take small sips rather than gulping a full glass quickly, which can cause nausea. A low-sugar electrolyte drink can help if you’ve been sweating heavily.
As a baseline, aim for six to eight glasses of water a day (roughly 1.5 to 2 liters). If your headache came on after skipping meals or drinking alcohol the night before, your body needs both water and food. A small snack alongside your fluids can help stabilize blood sugar, which is another common headache contributor.
Control Your Environment
If your headache involves any light sensitivity, get into a dim or dark room. Short-wavelength light, specifically blue, indigo, and violet light in the 400 to 500 nanometer range, is the most likely to worsen migraine pain. Screens, fluorescent lighting, and sunlight all produce significant amounts of this light. Turning off overhead lights, closing blinds, and putting your phone away can make a noticeable difference while you wait for medication to kick in.
If you can’t retreat to a dark room, specially tinted glasses with FL-41 lenses filter about 80% of the wavelengths from fluorescent lights. These have been shown to reduce migraine frequency over time by more than 50% in some studies, though they’re more useful for prevention than for stopping an attack already underway. Noise-canceling headphones or earplugs help if sound is making things worse.
Try Pressure and Stretching
For tension headaches, gentle pressure on your temples or the muscles at the base of your skull can provide quick relief. Use your fingertips to apply firm, circular pressure for 15 to 30 seconds at a time. Slowly rolling your neck from side to side and gently stretching the muscles along the top of your shoulders can release the tightness that drives tension headache pain.
Deep, slow breathing helps with both tension headaches and migraines. It activates your body’s relaxation response, lowering muscle tension and reducing the stress hormones that amplify pain. Even five minutes of focused breathing while lying down in a quiet room can shorten a headache’s duration.
Avoid the Rebound Trap
If you’re getting bad headaches frequently, the pain relievers you’re taking to treat them may actually be causing new ones. This is called medication overuse headache, and it’s more common than most people realize. Taking ibuprofen, acetaminophen, or naproxen on more than 15 days per month puts you at risk. For stronger medications like triptans (often prescribed for migraines), the threshold is even lower: more than 10 days per month.
The general guideline is to limit as-needed headache medication to no more than two to three days per week, or fewer than 10 days per month. If you find yourself reaching for pain relievers more often than that, the pattern itself may be fueling your headaches, and a preventive approach becomes more important than treating each individual episode.
Red Flags That Need Emergency Attention
Most headaches, even severe ones, aren’t dangerous. But certain features signal something more serious. Seek emergency evaluation if your headache:
- Came on suddenly and severely, reaching peak intensity within seconds to minutes, sometimes described as the worst headache of your life
- Comes with neurological changes like weakness in an arm or leg, new numbness, vision changes, or difficulty speaking
- Accompanies a fever, night sweats, or stiff neck
- Is clearly getting worse over days or weeks, becoming more frequent or more severe in a pattern you haven’t experienced before
- Changes with body position, getting significantly better or worse when you stand up or lie down
- Gets worse with coughing, straining, or bearing down
A sudden, explosive headache is the single most concerning red flag. It can indicate bleeding around the brain and requires immediate imaging. New headaches during or shortly after pregnancy also warrant prompt evaluation, as they can point to vascular problems that need treatment.

