What to Eat to Get Rid of Pinworms Naturally

No specific food will reliably eliminate a pinworm infection on its own. Pinworms are persistent parasites with a life cycle designed to reinfect you, and the most effective treatment is an over-the-counter medication called pyrantel pamoate, taken in two doses two weeks apart. That said, several foods have shown genuine antiparasitic properties in studies, and they can support your recovery alongside proper treatment and hygiene.

Why Food Alone Is Unlikely to Clear Pinworms

Pinworms have a simple but effective survival strategy. Female worms crawl out of the intestine at night and deposit eggs on the skin around the anus. Within two to three hours, those eggs become infectious. If they end up on your hands, bedding, or clothing, they can survive on surfaces for two to three weeks. This means reinfection happens easily, and you need something strong enough to kill the adult worms inside your gut while you simultaneously break the egg cycle through hygiene. Antiparasitic medication does the first part. Strict handwashing, daily laundering of bedding, and morning showers do the second.

The CDC recommends pyrantel pamoate, which is available without a prescription at most pharmacies. It’s taken once, then repeated two weeks later because the medication kills worms but not eggs. That second dose catches any worms that hatched after the first round.

Papaya Seeds: The Strongest Food-Based Evidence

If any food comes close to acting like medicine against intestinal parasites, it’s papaya seeds. In a clinical trial with 60 children who had confirmed intestinal parasites, those given a mixture of air-dried papaya seeds and honey had a 76.7% parasite clearance rate, compared to just 16.7% in the group that received honey alone. Depending on the type of parasite, clearance rates ranged from 71.4% to 100%. No harmful side effects were reported.

The mixture used in the study was a 20 mL dose of blended air-dried papaya seeds combined with honey. You can replicate this at home by scooping seeds from a ripe papaya, letting them air-dry, grinding them, and mixing them with honey. The taste is peppery and slightly bitter. While the study looked at a range of intestinal parasites rather than pinworms specifically, the broad-spectrum results are promising enough to make this worth trying alongside conventional treatment.

Pumpkin Seeds and Their Antiparasitic Compounds

Pumpkin seeds have a long folk-medicine history as a deworming food, and lab research supports the idea. The seeds contain a collection of active compounds, including one called cucurbitine, along with fatty acids and alkaloids like berberine and palmatine. Together, these appear to work against intestinal worms. In animal studies, pumpkin seed extract reduced both egg counts and adult worm numbers in the gut, with the strongest effects at higher doses.

The practical challenge is quantity. The effective doses in animal research were relatively large (scaled to body weight), and no human clinical trial has established exactly how many pumpkin seeds you’d need to eat to see results against pinworms. Still, raw pumpkin seeds are nutritious and safe. Eating a handful daily during an infection is a reasonable addition to your treatment plan, not a replacement for it. Choose raw, unsalted seeds rather than roasted ones, since heat may reduce the activity of some compounds.

Other Foods People Try

Several other foods appear in home remedy lists, but the evidence behind them varies significantly.

  • Raw garlic: Garlic contains compounds with known antimicrobial properties, and some people crush raw cloves into food or swallow small pieces whole. No human studies have tested garlic specifically against pinworms, but its broad antimicrobial activity makes it a reasonable dietary addition.
  • Raw carrots: The theory is that the fiber in raw carrots helps push worms out of the intestines mechanically. There’s no clinical evidence to support this. Carrots do promote regular bowel movements, which is helpful during an infection, but they won’t kill pinworms.
  • Coconut oil: Some people swallow a teaspoon of coconut oil daily during an infection, based on its lauric acid content and known antibacterial properties. There are no studies confirming it works against pinworms. Applying a small amount externally around the anus before bed may help soothe itching and could theoretically make it harder for female worms to deposit eggs, though this hasn’t been formally tested either.

What to Eat During Recovery

Beyond trying to kill the worms directly, your diet can help your gut recover from the infection and from the medication used to treat it. Research on how pinworm infection and treatment affect gut bacteria reveals some interesting shifts. After infection and deworming, levels of beneficial bacteria tend to increase naturally, particularly certain strains that support immune function and reduce inflammation. Your job is to feed those good bacteria so they can flourish.

High-fiber foods are the foundation. Vegetables, fruits, whole grains, and legumes all provide the kind of fiber that beneficial gut bacteria thrive on. Fermented foods like yogurt, kefir, sauerkraut, and kimchi introduce live bacterial cultures directly. Yogurt that contains live active cultures is a particularly good choice, since some of the bacterial strains that increase after deworming are closely related to those found in fermented dairy.

Reducing sugar intake during an active infection is also sensible. While pinworms feed on intestinal contents regardless of what you eat, a diet heavy in refined sugar can promote inflammation and make it harder for your gut to maintain a healthy bacterial balance.

Hygiene Matters More Than Diet

The uncomfortable truth about pinworms is that even the best diet won’t help if you keep reinfecting yourself. Pinworm eggs are microscopic and incredibly easy to spread. The single most important habit during an outbreak is washing your hands thoroughly with soap and warm water, especially after using the bathroom, after waking up, and before eating. Beyond that, a few daily practices make a real difference during the two to three weeks it takes to break the cycle.

Wash all bedding, towels, and pajamas in hot water every morning. Shower first thing in the morning rather than at night, since eggs are deposited overnight and a morning shower removes them before they spread. Keep fingernails trimmed short so eggs can’t collect underneath them. Avoid shaking out bedding or clothing, which can send eggs airborne. These steps, combined with a two-dose course of medication, clear most household pinworm infections completely within a few weeks.