When a person has a pinworm infection, adult pinworms live in the intestine and colon. At night, the female adult worms deposit their eggs outside the rectum or anal area.

One way to detect pinworms is to shine a flashlight on the anal area. The worms are tiny, white, and threadlike. If none are seen, check for 2 or 3 additional nights.

The best way to diagnose this infection is to do a tape test. The best time to do this is in the morning before bathing, because pinworms lay their eggs at night.

Steps for the test are:

Firmly press the sticky side of a 1-inch (2.5 centimeters) strip of cellophane tape over the anal area for a few seconds. The eggs stick to the tape.

The tape is then transferred to a glass slide, sticky side down. Put the piece of tape in a plastic bag and seal the bag.

Wash your hands well.

Take the bag to your health care provider. The provider needs to check the tape to see if there are eggs.

The tape test may need to be done on 3 separate days to improve the chances of detecting the eggs.

You may be given a special pinworm test kit. If so, follow instructions on how to use it.