Babies most commonly get worms by swallowing microscopic eggs that have been picked up on their fingers, toys, or food. Pinworm is the most common intestinal parasite in children, and its eggs can survive on household surfaces for two to three weeks, making reinfection frustratingly easy. Less commonly, babies can pick up roundworms from contaminated soil or hookworms through skin contact with infected ground.
Pinworms: The Most Common Route
Pinworm is by far the most likely worm infection your baby will encounter. It spreads through a simple cycle: an infected person (often another child or a caregiver) has tiny eggs around their anal area. Those eggs end up on fingers, under fingernails, on diapers, clothing, bedding, toys, or food. When your baby touches a contaminated surface and then puts their fingers in their mouth, they swallow the eggs. Within about two to three hours of being laid, pinworm eggs are already capable of infecting someone new.
What makes pinworms so persistent is how long the eggs last outside the body. If surfaces aren’t properly cleaned, the eggs remain infectious for two to three weeks. In a household with a crawling baby who touches everything and mouths every object, that’s a wide window of opportunity. Daycare settings pose a particular risk because of shared toys, close contact between children, and the sheer number of diaper changes happening each day.
Pinworm infections also frequently cause no symptoms at all, which means an older sibling or adult in the household can carry and spread the parasite without anyone realizing it. When symptoms do appear, the telltale sign is itching around the anus, especially at night, because that’s when female pinworms migrate to the skin to lay eggs. Scratching transfers eggs to the fingers, and the cycle starts again.
Roundworms From Pets and Soil
A different type of worm, called Toxocara, comes from dogs and cats rather than other people. Puppies are the biggest source. They typically get infected from their mother before birth or during nursing, and by three to four weeks of age, the roundworms inside the puppy are producing eggs that pass into the environment through the puppy’s stool. Those eggs need two to four weeks in the soil to mature enough to cause infection, but once they do, they can persist in dirt for months.
Babies get exposed when they play in soil, sandboxes, or grassy areas where an infected animal has defecated. A baby who grabs a fistful of contaminated dirt and brings it to their mouth can swallow the eggs. Once inside the body, the eggs hatch and the larvae can spread to different organs. This is why keeping pets dewormed on schedule and promptly cleaning up animal waste matters, especially in yards where your baby plays.
Hookworms Through the Skin
Hookworm takes a different path entirely. Instead of being swallowed, hookworm larvae in contaminated soil or sand burrow directly through exposed skin. This usually happens on bare feet, but for a baby crawling or sitting on warm, moist ground, any uncovered skin is vulnerable. The larvae then migrate through the skin, sometimes leaving visible, winding red tracks just beneath the surface. In rare cases, they travel deeper into the lungs or intestinal tract.
Hookworm is far less common in developed countries with modern sanitation, but it remains a concern in tropical and subtropical regions. If your baby is crawling on beaches or dirt in warm climates, a blanket or mat provides a simple barrier.
Signs of Worms in Babies
Many worm infections produce no obvious symptoms, which is one reason they spread so easily. When signs do show up, they vary depending on the type of worm. Pinworm infections commonly cause itching around the anus or, in girls, the vaginal area. Because the itching peaks at night, you may notice your baby is unusually restless, has trouble sleeping, or seems more irritable than normal. Teeth grinding, occasional stomach pain, nausea, and even bedwetting in older toddlers are all associated symptoms.
With roundworms from pets, symptoms depend on where the larvae travel in the body and can range from mild fever and cough to abdominal discomfort. Hookworm infections typically start with an itchy rash where the larvae entered the skin.
You might also spot something in a diaper. Pinworms are thin, white, and about the length of a staple. They’re sometimes visible around the anus or in stool, particularly at night or first thing in the morning.
How Pinworms Are Diagnosed
If you suspect pinworms, the standard test is straightforward. A piece of clear adhesive tape is pressed against the skin around the anus first thing in the morning, before bathing or wiping. The tape picks up any eggs that were deposited overnight, and your doctor examines it under a microscope. Because the worms don’t lay eggs every single night, the test is typically repeated on three consecutive mornings to improve accuracy.
Treatment for Babies and Young Children
Standard deworming medications are effective against most intestinal worms, but age matters when it comes to dosing. The World Health Organization recommends a half dose of the common deworming medication for children under 24 months. For children between one and four years old, full-dose treatment is considered safe and is used routinely in regions where worm infections are widespread. Your child’s doctor will determine the appropriate medication and dose based on age, weight, and the type of worm involved.
One important detail: treating just the baby often isn’t enough. Pinworm eggs spread so readily through a household that the entire family is usually treated at the same time to break the cycle of reinfection.
Preventing Reinfection at Home
Getting rid of worms is only half the battle. The eggs already scattered around your home can cause reinfection within days if you don’t clean thoroughly. Wash all bedding, pajamas, underwear, towels, and washcloths in hot water (at least 130°F) and dry them on a high heat setting. The heat kills pinworm eggs. Handle contaminated items carefully and avoid shaking them out, which can send eggs airborne.
Keep your baby’s fingernails trimmed short so there’s less space for eggs to hide underneath. Wash your baby’s hands frequently, especially before meals and after diaper changes. Clean toys, particularly ones that go in the mouth, with hot soapy water. Hard floors and bathroom surfaces should be wiped down regularly during and after treatment.
For roundworms from pets, the prevention strategy centers on keeping animals on a regular deworming schedule, picking up pet waste promptly, and covering sandboxes when they’re not in use. If your baby plays outside, washing their hands (and anything they’ve been chewing on) before they come back indoors reduces the chance of swallowing eggs from contaminated soil.

