How Do You Get Roundworms? Causes and Risk Factors

Roundworms infect humans through several distinct routes depending on the species: swallowing microscopic eggs from contaminated soil, food, or surfaces, or in the case of hookworms, larvae burrowing directly through bare skin. Over 883 million children worldwide required treatment for soil-transmitted roundworm infections in 2024 alone, making these among the most common parasitic infections on the planet.

Swallowing Eggs From Contaminated Soil

The most widespread human roundworm, Ascaris, follows a straightforward path. An infected person passes eggs in their stool. When sanitation is poor, those eggs end up in the soil, where they mature into an infectious form. You then swallow the eggs without knowing it, usually by eating unwashed produce grown in contaminated soil, drinking contaminated water, or touching contaminated dirt and then touching your mouth. Children who play in soil and put their hands in their mouths are especially vulnerable.

What makes this cycle so persistent is how remarkably durable the eggs are. Ascaris eggs can survive in soil for months to years depending on conditions. Research has documented survival times ranging from 90 days up to 7 years in soil, far outlasting most other pathogens. The eggs are resistant to many common disinfectants and environmental stresses, which is why they accumulate in areas with poor sanitation. Using human feces as fertilizer, a practice still common in some regions, directly seeds agricultural soil with infectious eggs.

Hookworm Larvae Enter Through Your Skin

Hookworms take a different approach entirely. Instead of waiting to be swallowed, hookworm larvae in contaminated soil actively penetrate exposed skin. This usually happens through bare feet but can occur anywhere skin contacts contaminated ground, including hands, legs, or any area not covered by clothing.

Once through the skin, the larvae migrate through the body. In zoonotic hookworm infections (those picked up from animal-contaminated soil), the larvae typically tunnel through the upper layers of skin, creating visible, winding red tracks. Human-specific hookworms travel deeper, reaching the lungs and eventually the intestines where they mature into adults. Walking barefoot on moist, warm soil in areas with poor sanitation is the primary risk factor.

Pinworms Spread on Surfaces and Hands

Pinworms are the most common roundworm infection in developed countries, and their transmission has nothing to do with soil. Female pinworms crawl to the skin around the anus at night and deposit eggs. The intense itching this causes leads to scratching, which transfers eggs to the fingers and under the fingernails. From there, the eggs spread to everything the person touches: doorknobs, bedding, clothing, toys, bathroom surfaces.

You get infected by swallowing the eggs, either by touching a contaminated surface and then your mouth, or in rare cases by inhaling airborne eggs and swallowing them. The eggs become infectious remarkably fast, within 4 to 6 hours under optimal conditions. This makes reinfection extremely common, especially in households with young children. A child scratches, touches a shared surface, and another family member picks up the eggs before anyone washes their hands. Pinworm eggs can also survive on bedding and clothing, which is why washing linens in hot water is a standard part of breaking the cycle.

Roundworms From Pets and Animals

Dogs and cats carry their own species of roundworm, and these can infect humans too. The parasite Toxocara, found in dog and cat feces, spreads when people accidentally swallow eggs from contaminated dirt or unwashed hands. Young children are at highest risk because they’re more likely to play in areas where pets have defecated and then put their fingers in their mouths.

Once swallowed, the eggs hatch and the larvae spread through the body. Unlike in their natural animal hosts, these larvae can’t complete their life cycle in humans, so they wander through tissues including the liver, lungs, and in rare cases the eyes, causing an inflammatory reaction. Keeping pets on a regular deworming schedule and cleaning up pet waste promptly reduces the risk significantly. Sandboxes and parks where animals roam freely are common exposure points.

Pigs are another source. The pig roundworm is closely related to the human Ascaris species and can cross-infect people who come into contact with pig feces or soil contaminated by pigs.

Who Is Most at Risk

Soil-transmitted roundworm infections concentrate in tropical and subtropical regions with limited sanitation infrastructure. Sub-Saharan Africa, South America, China, and South and Southeast Asia have the highest prevalence. The World Health Organization identifies several groups at particular risk: preschool and school-age children, women of reproductive age (including pregnant women), and adults in occupations involving close contact with soil, such as tea pickers and miners.

Over 260 million preschool-age children and 654 million school-age children live in areas where these parasites are actively transmitted. The common thread across all these groups is regular exposure to contaminated soil combined with limited access to clean water, sanitation, and hygiene. In higher-income countries, pinworms remain common across all demographics because they don’t require soil contact, while Toxocara infections occur wherever children have access to areas contaminated with pet feces.

How to Reduce Your Risk

Prevention depends on which type of roundworm you’re trying to avoid, but a few principles apply broadly. Handwashing with soap after using the bathroom, before eating, and after contact with soil or animals is the single most effective measure. For soil-transmitted species, washing, peeling, and cooking raw fruits and vegetables eliminates eggs that may be clinging to the surface. Heat kills roundworm eggs reliably: research has shown complete destruction at 62°C (about 143°F), well below normal cooking temperatures.

Wearing shoes in areas where soil may be contaminated with human or animal feces prevents hookworm larvae from penetrating the skin. For pinworms, frequent handwashing, keeping fingernails short, and laundering bedding and underwear in hot water help interrupt the cycle of reinfection. Deworming pets regularly and promptly disposing of their feces keeps Toxocara eggs out of shared spaces like yards and playgrounds.