Ibuprofen does help get rid of sunburn pain, according to the Skin Cancer Foundation, as it acts as a pain reliever and anti-inflammatory agent. Taken at the onset of sunburn and continued for 48 hours, ibuprofen also reduces redness and swelling. In some cases, ibuprofen may also help to prevent permanent skin damage.
The Skin Cancer Foundation notes that acetaminophen also relieves sunburn pain, but this medication does not fight inflammation. An over-the-counter hydrocortisone cream can also help with sunburn pain, according to Stony Brook Medicine. A cool bath containing 2 ounces of baking soda soothes the pain and burn as well. Sunburn pain typically lasts 48 hours. If pain or swelling worsens, individuals should seek medical attention.