Overview
A pinworm infection is one of the most common worm infections worldwide. Pinworms are thin and white. They're about 1/4 to 1/2 inch — about 6 to 13 millimeters — long.
Pinworm infections are caused by swallowing or breathing in pinworm eggs. These tiny eggs are too small to see with the eyes. Infection happens most often in school-age and preschool-age children.
Symptoms of a pinworm infection can include anal itching and restless sleep. That's because when their hosts sleep, female pinworms lay thousands of eggs in the folds of skin that surround the anus. But many people with pinworm infections have no symptoms.
Treatment for a pinworm infection involves taking anti-parasite medicines that kill the pinworms. For best results, everyone in the family of the person with the infection should be treated. All bedding, pajamas and underwear should be washed in hot water too.
Help prevent pinworm infections by bathing often and washing hands regularly. Wash laundry such as bedsheets and underwear in hot water. Keep fingernails short and don't scratch the anal area.

Pinworm
An adult pinworm generally is 1/4 to 1/2 inch (about 6 to 13 millimeters) in length. The most common symptom of infection is anal itching, particularly at night, as worms migrate to the host's anal area to lay their eggs.
Symptoms
Symptoms of a pinworm infection can include:
- Itching of the anal or vaginal area.
- Trouble falling or staying asleep, called insomnia.
- Irritable or restless mood.
- Teeth grinding.
- Occasional stomach pain, upset stomach or vomiting.
- Bedwetting.
But pinworm infections often cause no symptoms.
When to see a doctor
Talk with your healthcare professional if you or your child has serious anal itching, especially at night.
From Mayo Clinic to your inbox
Causes
Most often, swallowing pinworm eggs causes a pinworm infection. The eggs spread through stool. This can be carried to the mouth by tainted food or drink or by unwashed fingers. Once swallowed, the eggs hatch in the small intestine. They grow into adult worms within a few weeks.
Female pinworms move to the anal area to lay their eggs. This often causes anal itching. If you scratch the itchy area, the eggs cling to your fingers and get under your fingernails. The eggs then get transferred to other surfaces, such as toys, bedding or toilet seats. The eggs also can be transferred from fingers to food, liquids, clothes or other people.
Pinworm eggs can survive on surfaces indoors for 2 to 3 weeks.
Much less often, pinworm eggs get into the air and are inhaled and swallowed.
Risk factors
Risk factors for a pinworm infection include:
- Being young. Pinworm infections are most likely to happen in children ages 5 to 10. The tiny eggs are easily spread to family members, caregivers, or other children at school or child care centers. Pinworm infections are not common in children younger than age 2.
- Living in crowded spaces. People who live in closed, crowded places such as institutions are at higher risk of pinworm infections.
Complications
Most often, pinworm infections don't cause serious problems called complications. Rarely, having many pinworms in the body can cause infection of female genitals. The worms can travel from the anal area to the vagina.
Other rare complications of a pinworm infection can include:
- Urinary tract infections.
- Weight loss.
- Infection of a part of the stomach area called the peritoneal cavity.
Prevention
You can take the following steps to help prevent a pinworm infection. If you've had a recent infection, these steps also can help lower the risk of another one:
- Wash your hands. To lower your risk of getting or spreading an infection, wash your hands well. Be sure to wash after using the toilet or changing a diaper, and before eating.
- Wash yourself in the morning. Pinworms lay their eggs at night. So washing the anal area in the morning can help lower the number of pinworm eggs on your body. Showering instead of taking a bath may help prevent eggs from spreading in bath water.
- Change underwear daily. This helps remove eggs. During treatment, change bedding daily too.
- Launder in hot water. Wash bedsheets, pajamas, underwear, washcloths and towels in hot water to help destroy pinworm eggs. Dry on high heat.
- Clean commonly used objects. Pinworm eggs can cling to surfaces indoors for up to 3 weeks. This includes the surfaces of toys, faucets, bedding and toilet seats. Clean these items often.
- Don't scratch. Try not to scratch the anal area. Trim your child's fingernails so there's less space for eggs to collect. Tell your child that it's important not to bite the nails.