Pinworms are diagnosed by finding the adult worms in the stool or around the anus. The worms are most visible two to three hours after the person goes to sleep. One way to check for eggs is to briefly place and remove a piece of clear adhesive tape over the anus. The tape can then be examined for signs of pinworms directly or with a microscope.