Sun exposure while taking the antibiotic Bactrim may cause skin symptoms known as photosensitivity. Staying away from the sun will help protect your skin, but sometimes, you may need medical attention.

Bactrim is a brand-name oral antibiotic prescribed to treat certain bacterial infections. These include urinary tract infections (UTIs) and ear infections.

As with other medications, Bactrim can cause side effects. Photosensitivity (sun sensitivity) is one of the more common side effects with Bactrim. You can protect your skin by avoiding sun exposure and treating any symptoms.

This article discusses Bactrim and sun exposure, including the symptoms of sun sensitivity, how long it lasts, and when to see a doctor. You’ll also learn about Bactrim’s other side effects and more.

Note: Bactrim also comes as Bactrim DS (double strength). For the rest of this article, the term “Bactrim” refers to both Bactrim and Bactrim DS.

aerial view of sandy beach with umbrellas for shadeShare on Pinterest
Matteo Colombo/Getty Images

With sun sensitivity, your skin becomes very sensitive to sunlight and other forms of UV light, such as tanning beds. Some medical conditions or exposure to certain chemicals can cause sun sensitivity. Several medications can also do so, including Bactrim.

Bactrim contains active ingredients sulfamethoxazole and trimethoprim. These ingredients may cause sun sensitivity through chemical changes in your skin. These changes most often lead to phototoxicity, which is skin irritation caused by sun sensitivity.

Phototoxicity is a type of photosensitive dermatitis. With this condition, your skin develops unusual reactions to sunlight or UV radiation from natural or artificial light.

Other antibiotics can also cause sun sensitivity. In addition to Bactrim and its generic version, co-trimethoprim, these antibiotics include:

If you’re exposed to the sun or other UV light while taking Bactrim, you may develop symptoms of sun sensitivity within 30 minutes to 24 hours. These symptoms include:

  • skin that burns easily when exposed to sunlight or some forms of UV light
  • skin rash or sunburn, especially on areas of exposed skin
  • feeling pain in the affected areas, with skin that may:

When to see a doctor

If you have symptoms of sun sensitivity, you should get medical attention. A doctor or another healthcare professional will check your symptoms and determine if you need treatment. Treatment may include corticosteroid medications to reduce inflammation and ways to relieve your sunburn symptoms at home.

In some cases, your doctor may have you stop taking Bactrim and prescribe a different antibiotic that doesn’t cause this side effect. (See “Bactrim alternatives” below to learn more.)

However, this may not always be possible. If they advise you to continue Bactrim treatment, they’ll help prevent sun sensitivity with the appropriate precautions, such as avoiding sun exposure.

Finish your antibiotic

Do not stop taking your antibiotic without consulting your doctor, even if you feel better. Not finishing the full course as prescribed may cause the infection to come back stronger. In some cases, the drug may no longer work to treat your infection. Read more about antibiotic resistance.

Learn about Bactrim’s recommended dosage.

If your doctor prescribes Bactrim, they’ll advise you to stay out of the sun. If you have to be in the sun, there are several ways to protect yourself, including sunscreen.

Other ways to reduce sun exposure and protect your skin include:

  • wear protective clothing outside, including:
    • clothing that covers as much skin as possible
    • a hat with a wide brim to shade your face, ears, head, and neck
    • sunglasses that block both UVA and UVB rays
  • stay in the shade, especially between 10 a.m. to 4 p.m.
  • avoid indoor tanning facilities
  • drink plenty of fluids (but it’s best to avoid alcohol, which may dehydrate you)

How long does antibiotic sun sensitivity last?

Antibiotic sun sensitivity can last for as long as you’re taking the medication. It typically stops shortly after you finish your course of antibiotics. However, it may sometimes last for several months afterward.

If you continue to experience symptoms of sun sensitivity, talk with your doctor. They can help determine whether it’s from the medication or something else.

Bactrim and alcohol

There doesn’t appear to be any research into links between sun exposure, alcohol, and Bactrim. Alcohol is not known to interact with Bactrim. However, doctors may recommend to avoid drinking alcohol while taking Bactrim. If you have questions about drinking alcohol while taking Bactrim, talk with your doctor. Learn more about antibiotics and alcohol.

Bactrim can cause other side effects in addition to sun sensitivity. The list below includes some of the drug’s more common side effects:

Serious side effects are possible but uncommon, including:

Talk with your doctor if you experience bothersome side effects with Bactrim. If you have serious side effects, call your doctor right away. If your symptoms seem life threatening or a medical emergency, immediately call 911 or your local emergency number.

Medications containing sulfamethoxazole and trimethoprim may not suit some people. This includes people who are unable to avoid the sun for various reasons. If Bactrim isn’t right for you, your doctor may recommend other medications instead. For example, scientists investigating the side effects of Bactrim for UTIs compared it with other antibiotics, including:

They also compared it with ciprofloxacin, but this drug also causes sun sensitivity. For more information about Bactrim alternatives, talk with your doctor or pharmacist.

The active ingredients in Bactrim can cause sun sensitivity symptoms. These include being more sensitive to sunlight and UV rays, leading to rashes, sunburns, and other skin problems.

Sun sensitivity typically stops after you stop taking the medication, but it may last longer.

You can help prevent Bactrim sun sensitivity by avoiding sun exposure and using sunscreen. Bactrim may also cause other mild or sometimes severe side effects.