Explainer · July 27, 2026 · 4 min · By Barnaby Quillon
The 24-Hour Window: Why Timing Matters More Than Brand When Taking NSAIDs for Sunburn
Ibuprofen can meaningfully blunt sunburn inflammation, but only if you take it early. Here is the mechanism behind the deadline, and what the drug can and cannot do once redness peaks.

Ask people how they treat a sunburn and most will mention aloe, a cool shower, and maybe an ibuprofen "for the pain." That last part undersells what non-steroidal anti-inflammatory drugs actually do, and it misses the most important detail: when you take them matters more than which one you take. The evidence points to a narrow window, roughly the first 24 hours after exposure, during which NSAIDs can reduce the inflammatory cascade itself rather than just dulling your perception of it.
To understand why, it helps to know what a sunburn actually is at the cellular level. Ultraviolet radiation, particularly UVB, damages DNA in keratinocytes, the workhorse cells of the epidermis. Damaged cells release signaling molecules, and one of the central players is an enzyme called cyclooxygenase-2, or COX-2. UV exposure sharply upregulates COX-2 in skin, and COX-2 drives production of prostaglandins, especially prostaglandin E2. Prostaglandin E2 dilates blood vessels in the dermis, which is what produces the visible redness, and it sensitizes nerve endings, which is why sunburned skin hurts when your shirt brushes against it.
Here is the key point: NSAIDs like ibuprofen and naproxen work by inhibiting COX enzymes. If the drug is on board while prostaglandin production is ramping up, it can partially suppress that ramp. Studies of experimentally induced UV erythema have shown that oral NSAIDs taken shortly after exposure measurably reduce redness and skin sensitivity in the hours that follow. But sunburn inflammation is not driven by prostaglandins alone. After roughly the first day, other pathways, including cytokines like interleukin-6 and tumor necrosis factor, plus infiltrating immune cells, take over as the main engines of inflammation. NSAIDs do little against those. Take ibuprofen on day two and you are getting a modest painkiller, not an anti-inflammatory intervention against the burn itself.
This explains a common frustration. Someone burns on Saturday, tolerates it, then wakes up Sunday when the erythema peaks, typically 12 to 24 hours after exposure, and starts taking ibuprofen. It helps a little with soreness, but the redness marches on unchanged, and the person concludes the drug "does nothing for sunburn." The drug did not fail. The window closed.
Practical translation: if you realize you have overdone it, whether at the beach, on a ski slope, or through a car window on a long drive, the useful move is a standard adult dose of an oral NSAID as soon as reasonably possible, continued at labeled intervals for the first 24 hours or so. Ibuprofen and naproxen are the usual choices. Naproxen has a longer duration per dose, which some people find convenient overnight. Aspirin also inhibits COX but is generally a second choice for this purpose. Acetaminophen, by contrast, works mostly in the central nervous system and has minimal effect on peripheral prostaglandin production in skin, so it can ease pain but will not touch the vascular and inflammatory component.
A few honest caveats belong here. First, early NSAIDs reduce the severity of the reaction, they do not erase it. A bad burn taken care of promptly is still a burn, and DNA damage to skin cells has already occurred by the time you feel anything. No pill undoes that, which is why long-term skin cancer risk from a burn is not changed by how well you manage the symptoms. Second, NSAIDs are not appropriate for everyone. People with kidney disease, a history of stomach ulcers or GI bleeding, those on blood thinners, and anyone in later pregnancy should avoid them or check with a clinician first. Sunburn also mildly dehydrates you as fluid shifts toward the inflamed skin, and NSAIDs are harder on kidneys in a dehydrated state, so pair the pill with water.
What about topical NSAIDs, the diclofenac gels sold for joint pain? They inhibit the same enzyme, and small studies suggest topical application can reduce UV-induced redness. But these products are labeled and formulated for musculoskeletal use, absorption through inflamed skin is less predictable, and spreading anything across a large sunburned area raises the total absorbed dose. For a garden-variety sunburn, oral dosing plus cool compresses is the simpler, better-studied route.
One more myth worth flagging: taking an NSAID before sun exposure as "prevention" is a bad trade. It may blunt the early warning redness that tells you to get out of the sun, while doing nothing to block the UV damage accumulating underneath. Sunscreen, shade, and clothing prevent burns. NSAIDs only soften the aftermath, and only if you respect the clock.
The bottom line: think of oral NSAIDs as a first-day tool with a mechanism-based deadline. Taken within hours of exposure, they suppress the prostaglandin surge that drives redness, heat, and tenderness. Taken after the burn has peaked, they are just pain relief. Either way, the rest of good recovery still applies: cool water, plain moisturizer once the heat settles, hydration, and leaving blisters intact.
Related reading: Aloe Vera and Sunburn: What It Actually Does.