How to Get Rid of Pinworms: Treatment and Prevention

Pinworms are treated with a single dose of oral medication, followed by a second dose two weeks later. The most common over-the-counter option is pyrantel pamoate, available at most pharmacies without a prescription. With proper medication and a few weeks of consistent hygiene, the infection clears completely.

How Pinworm Medication Works

Three medications are used to treat pinworms. All follow the same basic pattern: one dose now, one dose in two weeks.

  • Pyrantel pamoate is available over the counter. The dose is based on body weight (11 mg per kilogram, up to a maximum of 1 gram).
  • Mebendazole requires a prescription. The dose is 100 mg for both adults and children.
  • Albendazole also requires a prescription. The dose is 400 mg for both adults and children.

The reason for two doses is simple: these medications kill live worms but cannot kill eggs. The full pinworm life cycle, from swallowed egg to adult worm laying new eggs, takes about three to four weeks. By taking that second dose at the two-week mark, you catch newly hatched worms before they mature enough to lay eggs of their own. Skipping the second dose is the most common reason people end up reinfected.

Why Everyone in the Household Needs Treatment

Pinworms spread easily and silently. Female worms crawl out at night to deposit eggs around the anus, which causes the intense itching most people notice. Scratching transfers microscopic eggs to fingers, and from there to doorknobs, light switches, bedding, and food. A person can carry the infection without any symptoms at all.

The CDC recommends treating the infected person, their caretakers, and all household members at the same time. If even one family member is skipped, they can quietly reinfect everyone else after treatment ends. This is especially common in households with young children.

Confirming the Infection

If you suspect pinworms but haven’t confirmed it, the standard test is straightforward. First thing in the morning, before the person bathes, uses the toilet, or gets dressed, press a strip of clear tape against the skin near the anus. The tape picks up any eggs deposited overnight. Fold the tape sticky-side down onto a glass slide or place it in a sealed bag and bring it to your doctor’s office for examination under a microscope. Repeat this three mornings in a row for the most reliable result, since worms don’t lay eggs every single night.

Cleaning Your Home During Treatment

Pinworm eggs can survive up to two weeks on clothing, bedding, and household surfaces at room temperature. That means medication alone isn’t enough. You need to cut off the environmental supply of eggs while treatment does its job.

On the first day of treatment, wash all bed sheets, blankets, towels, pajamas, and underwear in hot water (at least 130°F) and dry them on high heat. The heat destroys the eggs. When handling contaminated laundry, avoid shaking it. Shaking sends eggs airborne, where they can land on new surfaces or be inhaled and swallowed. Instead, carefully roll items and place them directly into the washer.

For the two weeks following the last treatment dose, change the infected person’s underwear, pajamas, towels, and washcloths daily and wash them in hot water each time. Wipe down bathroom surfaces and commonly touched areas like light switches and faucet handles regularly.

Daily Hygiene Habits That Prevent Reinfection

The two-week window after treatment is when reinfection risk is highest. These habits make the biggest difference during that period:

  • Morning showers, not baths. Bathe every morning to wash away eggs deposited overnight. Showers are better than tub baths because bath water can spread eggs. If multiple children need bathing, bathe them separately.
  • Change underwear every morning. Fresh underwear removes eggs that accumulated during the night.
  • Frequent handwashing. Wash with soap and warm water after using the toilet, after changing diapers, and before handling food. This is the single most effective way to break the cycle.
  • Short, clean fingernails. Eggs collect under nails when someone scratches. Keep nails trimmed short and scrub underneath them, especially after the first treatment dose.
  • No nail biting or scratching. Both habits transfer eggs directly to the mouth, completing the reinfection loop.
  • Don’t share washcloths or towels. Each person should use their own, and towels should not be reused between washes.

Relieving the Itching While You Wait

Even after taking the first dose, itching around the anus can persist for about a week as eggs and irritation linger. To get some relief, gently wash the area with warm water and soap. A thin layer of 1% hydrocortisone cream applied to the skin around the anus can calm the itch. This cream is available over the counter at any pharmacy. Keeping the area clean and dry, and wearing snug cotton underwear to bed, also helps reduce nighttime discomfort.

Discouraging scratching matters beyond comfort. Every time someone scratches and then touches another surface, they spread eggs and extend the cycle.

Do Home Remedies Work?

You’ll find suggestions online for raw garlic, coconut oil, raw carrots, and other natural remedies. There is no scientific evidence that any of these treatments eliminate pinworms. The infection is caused by a specific intestinal parasite with a well-understood life cycle, and the medications designed to target it are safe, inexpensive, and highly effective. Relying on unproven alternatives risks prolonging the infection and spreading it to others in your household.

Pyrantel pamoate costs roughly the same as a bottle of vitamins and is available without a prescription. For most families, it’s the fastest and simplest path to being done with pinworms for good.

Why Pinworms Keep Coming Back

Recurrent infections are common, and they almost always come down to one of three things: skipping the second dose, not treating everyone in the household, or incomplete environmental cleaning. Eggs can survive on surfaces for two weeks, and the worms have a built-in reinfection trick. Larvae can hatch directly around the anus and migrate back into the intestine without ever passing through the mouth. This is called retroinfection, and it means even perfect hand hygiene can’t fully protect you without medication.

If you’ve completed two full rounds of treatment for the whole household, followed the cleaning and hygiene steps for the full two-week window after the last dose, and the infection still returns, talk to your doctor. They may recommend a longer treatment course or investigate whether there’s an ongoing source of exposure outside the home, such as a school or daycare setting.