Can You Get an STD From Masturbating?

Is it safe to masturbate while being treated for an STD?

According to Planned Parenthood, masturbation is the safest form of sexual activity. That's because if you don't already have a sexually transmitted infection (STI), you can't get one from masturbating. The only exception is if you masturbate with an infected sex toy.

However, if you have a sexually transmitted disease (STD), there are some precautions you may need to take. Even if you are receiving treatment, these safety measures can protect you and the people around you.

Understanding how STDs spread can help you better understand the potential risks of getting or spreading an infection through masturbation. That's because whether or not it's safe to masturbate when you have an STD depends on what STD you have.

This article explains the different types of STDs, how they impact masturbation, and how to make masturbation safer.

Dos and Don'ts of Safe Masturbation

Verywell / Nusha Ashjaee

Vaginosis and Yeast Infections

It's reasonably safe to masturbate with bacterial vaginosis and yeast infections. That's true even if you're using a cream or suppository to treat the infection.

However, with these infections, there are some precautions you should take. Specifically, sex toys could end up becoming a fomite (an object that carries an infectious organism). That means if you don't adequately disinfect toys between uses, you could end up getting reinfected later.

What You Can Do

If you masturbate with sex toys or other objects, cover them with condoms and disinfect toys thoroughly between use.

STDs Spread By Skin Contact

If you have a treatable STD that spreads by skin-to-skin contact, you can still masturbate, but you should take some precautions when sores are present.

STDs that spread via skin contact include:

It is possible to spread these diseases to other parts of your body through a process known as autoinoculation. That means if you touch a sore, you can transmit the infection to another part of your skin and cause sores there. In addition, germs trapped under your nails can also spread infection.

What You Can Do

Try to avoid touching active sores when you masturbate. Instead, cover your hands with gloves during masturbation or mutual masturbation.

HIV and Hepatitis

Masturbation is very safe for people with human immunodeficiency virus (HIV) or hepatitis. It is not possible to reinfect yourself with these viruses.

However, you should be careful about masturbating in a shared space. Potentially infectious body fluids include semen, vaginal fluids, blood, and breast milk.

What You Can Do

If you live with others or are at another person's home, be sure to clean up after you masturbate. Doing so will help you avoid the risk of exposing anyone else to potentially infectious body fluids.

Bacterial STDs

It is generally safe to masturbate while you treat bacterial STDs. These STDs are treated systemically with antibiotics. That means the whole body is treated, rather than a specific part of the body.

Bacterial STDs that aren't spread by skin-to-skin contact include:

When treating a bacterial STD, you should not have sex again until you and your sex partner(s) have completed treatment. That will help you avoid infecting a new partner or reinfecting each other.

However, you can masturbate as much as you want.

In general, you can think about it this way. If you're taking a pill or being given medication through a shot, your whole body is being treated. You're therefore not at significant risk of reinfecting yourself.

On the other hand, if you are treating with creams or other local treatments, be careful. Those treatments are for infections of the skin that are easy to move from one place to another. So treating one area doesn't protect the other areas of your body from becoming infected.

What You Can Do

If you are taking antibiotic pills, you generally have the green light for masturbation because your risk of reinfection is low.

However, if you are using a treatment that you apply to a specific area, you want to be more careful. Using gloves and disinfecting sex toys after each use can reduce the risk of spreading infections.

Mutual Masturbation and STDs

Mutual masturbation is when you and a partner sexually arouse each other using your hands. It can also involve masturbating while near each other.

In general, mutual masturbation is relatively safe sex. That's particularly true if no bodily fluids are exchanged. Remember, though, that some STDs spread through skin-to-skin contact.

There are ways to make mutual masturbation even safer. They include:

  • Wash your hands: If you are touching your genitals, wash your hands before touching your partner's genitals—or vice versa.
  • Use gloves: You can also consider using gloved hands to touch your partner and bare hands to touch yourself. Either one of these things makes it less likely that you would spread infection between you.

In general, STDs that spread through bodily fluids—such as HIV and chlamydia—are relatively unlikely to be spread through mutual masturbation. There's a greater risk for STDs that spread from skin-to-skin contact, such as herpes and molluscum contagiosum.

Making Masturbation Safer

People don't always know when they have an STD. These dos and don'ts will help make masturbation safer while keeping it fun. The main idea is that you do your best to avoid transferring infection to or from your genitals.

If you think you could have an infection, see your healthcare provider or visit an STD clinic for screening.

Dos
  • Wash your hands before and after masturbation.

  • Clean under your nails regularly or keep them short.

  • Immediately wash your hands if you find pimples, sores, or other strange bumps while masturbating. Then try to avoid touching them.

Don'ts
  • Don't touch your eyes while you are masturbating. The eyes are susceptible to a number of STDs.

  • Don't share sex toys without covering them with condoms or disinfecting them thoroughly.

  • Don't reuse any sex toys without thoroughly cleaning them.

Summary

If you have an STD, masturbation is generally safe with a few precautions. Covering sex toys with condoms and disinfecting them between use, using gloves, avoiding touching sores, and washing your hands before and after can limit the possibility that you'll reinfect or spread infection elsewhere on your body.

A Word From Verywell

Treatment for an STD doesn't necessarily need to mean an end to masturbation. Remember that different kind of infections spread in different ways. For example, those that spread via skin-to-skin contact are more likely to be risky when you masturbate. That's because you can spread them to other parts of your body.

Mutual masturbation requires extra care when you are treating an active infection. Wearing gloves, washing hands, and disinfecting toys are ways to keep yourself and your partner safer.

Was this page helpful?
4 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Planned Parenthood. Is masturbation good for you?

  2. Brown University: Health and Wellness. What's the best way to clean sex toys?

  3. Workowski KA, Bachmann LH, Chan PA, et al. Sexually transmitted infections treatment guidelines, 2021MMWR Recomm Rep. 2021;70(4):1-187. doi:10.15585/mmwr.rr7004a1

  4. Centers for Disease Control and Prevention. Molluscum contagiosum: transmission. Updated May 11, 2015.

Additional Reading