How to Treat Pinworms: Medication and Hygiene Steps

Pinworm infections are treated with two doses of antiparasitic medication, spaced two weeks apart, combined with thorough household hygiene to prevent reinfection. The medication kills the live worms but not their eggs, which is why the second dose matters so much: it catches newly hatched worms that survived the first round as eggs.

Most pinworm infections clear up quickly with this approach. The challenge isn’t killing the worms. It’s breaking the cycle of reinfection, which requires attention to cleaning, handwashing, and sometimes treating the whole household at once.

Confirming the Infection

Before treating, it helps to confirm you’re actually dealing with pinworms. The standard method is a simple “tape test.” First thing in the morning, before the person bathes, uses the bathroom, or gets dressed, press the sticky side of a piece of clear tape against the skin near the anus. Female pinworms crawl out overnight to lay eggs, so early morning gives you the best chance of picking them up.

Do this three mornings in a row for accuracy. Place each tape sample in a sealed plastic bag or specimen container and bring it to your doctor’s office, where the eggs can be identified under a microscope. You can sometimes spot adult worms yourself, tiny white threads about a quarter to half inch long, visible around the anus at night or on underwear in the morning.

Medication: What to Take and When

Three medications are commonly used for pinworms. Pyrantel pamoate is the one you can buy over the counter at most pharmacies without a prescription. It paralyzes the worms so your body can expel them naturally. Mebendazole and albendazole are prescription alternatives that work by blocking the worms’ ability to absorb nutrients, starving them.

Regardless of which medication you use, the treatment schedule is the same: one dose now, and a second dose two weeks later. The two-week gap isn’t arbitrary. Pinworm eggs take about two weeks to hatch, and since no available medication kills eggs, you need that second dose to wipe out the new generation of worms before they mature and start laying eggs of their own. Skipping the second dose is one of the most common reasons people end up reinfected.

For children under two, talk to a pediatrician before giving any pinworm medication, as dosing needs to be adjusted. The same goes for anyone who is pregnant or breastfeeding.

Treating the Whole Household

Pinworm eggs are microscopic and spread easily. A child scratches, touches a doorknob, and the cycle continues. By the time one family member has symptoms (typically nighttime itching around the anus), others in the household may already be carrying the infection without knowing it. That’s why many doctors recommend treating all household members at the same time, even those without symptoms. Treating just the person who’s itching while others silently harbor eggs often leads to a frustrating cycle of reinfection.

Hygiene Steps That Actually Matter

Medication handles the worms inside your body. Cleaning handles the eggs outside it. Pinworm eggs can survive on surfaces, though the majority become non-infective within about five days after being laid. During those five days, they’re a reinfection risk on bedding, clothing, towels, and household dust. Here’s what to focus on during and after treatment:

  • Bedding and clothing: Wash sheets, pajamas, underwear, and towels in hot water (at least 130°F) and dry them on a hot dryer setting. The heat kills eggs. Do this on the morning you start treatment and again regularly for the next couple of weeks.
  • Handwashing: This is the single most important habit for breaking the cycle. Wash hands thoroughly with soap and warm water after using the bathroom, after changing diapers, before eating, and before preparing food. Scrub under fingernails, where eggs tend to collect.
  • Fingernails: Keep them trimmed short. Eggs lodge under nails when a person scratches, and those eggs end up on everything they touch.
  • Morning showers: A shower first thing in the morning washes away eggs deposited overnight around the anus. Baths can spread eggs in the water, so showers are preferable during treatment.
  • Avoid shaking fabrics: Handle bedding and clothing carefully rather than shaking them out, which sends eggs airborne and onto other surfaces.
  • Surface cleaning: Wipe down bathroom surfaces, doorknobs, and toilet seats. Vacuum carpets and upholstered furniture, especially in bedrooms.

You don’t need to deep-clean the entire house or throw anything away. The goal is reducing the number of viable eggs in the environment during the two-week window between medication doses.

Why Infections Keep Coming Back

Pinworms are notorious for recurring, especially in households with young children. The reasons are almost always practical rather than medical. The most common culprits: skipping the second dose of medication, not treating other household members, or relaxing hygiene measures too soon after the first dose.

The reinfection cycle works like this. Eggs are swallowed (from contaminated hands, food, or household dust), hatch in the small intestine, and mature over the next two to six weeks. The adult females then migrate to the anus at night to deposit thousands of new eggs. If even a small number of eggs survive on surfaces or under fingernails, the whole process restarts.

For persistent cases that return despite proper medication and hygiene, a doctor may recommend an extended treatment schedule with doses at both 14 and 28 days after the initial treatment. This adds a third round to catch any stragglers from a particularly stubborn cycle of autoinfection, where a person keeps reinfecting themselves from eggs on their own body.

Do Home Remedies Work?

Garlic, coconut oil, raw carrots, and various herbal supplements appear regularly in online discussions about pinworm treatment. None of these have clinical evidence showing they reliably eliminate a pinworm infection. Some, like garlic, have shown mild antiparasitic properties in laboratory settings, but that doesn’t translate to clearing an active infection in a human gut.

The risk of relying on home remedies isn’t just that they probably won’t work. It’s that the infection continues spreading through the household while you wait. Over-the-counter pyrantel pamoate is inexpensive, widely available, and resolves most infections when taken correctly with the two-dose schedule. There’s little reason to gamble on unproven alternatives when effective treatment is readily accessible.

What to Expect During Treatment

The itching typically improves within a few days of the first dose as the adult worms die off. You might notice dead worms in stool, which is normal and actually a sign the medication is working. The second dose two weeks later is a preventive measure, so you may not notice any obvious effect from it.

If itching persists beyond a few days after the first dose, or returns before the second dose, it could mean reinfection is already happening. Double down on the hygiene measures, particularly handwashing and morning showers, and make sure the second dose happens on schedule. If symptoms continue after completing both doses, a third round of treatment or a switch to a different medication may be needed.