In law and Forensic Psychology

In law enforcement circles, the term "pedophile" is sometimes used in a broad manner to encompass a person who commits one or more sexually-based crimes that relate to legally underage victims. These crimes may include child sexual abuse, statutory rape, offenses involving child pornography, child grooming, stalking, and indecent exposure. One unit of the United Kingdom's Child Abuse Investigation Command is known as the "Paedophile Unit" and specializes in online investigations and enforcement work. Some forensic science texts, such as Holmes (2008) use the term to refer to a class of psychological offender typologies that target child victims, even when such children are not the primary sexual interest of the offender. The FBI, however, makes a point of acknowledging preferential sex offenders who have a true sexual preference for prepubescent children.

Civil and legal commitment
In the United States, following Kansas v. Hendricks, sex offenders that can be diagnosed with certain mental disorders, including pedophilia, can be subject to indefinite civil commitment. In Kansas v. Hendricks, the US Supreme Court upheld as constitutional a Kansas law, the Sexually Violent Predator Act (SVPA), under which Hendricks, a pedophile, was found to have a "mental abnormality" defined as a "congenital or acquired condition affecting the emotional or volitional capacity which predisposes the person to commit sexually violent offenses to the degree that such person is a menace to the health and safety of others," which allowed the State to confine Hendricks indefinitely irrespective of whether the State provided any treatment to Hendricks. In United States v. Comstock, this type of indefinite confinement was upheld for someone previously convicted on child pornography charges; this time a federal law was involved—the Adam Walsh Child Protection and Safety Act. The Walsh Act does not require a conviction on a sex offense charge, but only that the person be a federal prisoner, and one who "has engaged or attempted to engage in sexually violent conduct or child molestation and who is sexually dangerous to others," and who "would have serious difficulty in refraining from sexually violent conduct or child molestation if released". Neither sexually violent conduct nor child molestation is defined by the Act.

In 2012, Moldova reacted to an increase of Western European and United States citizens traveling to the country for the purpose of sex tourism with minors. The parliament of Moldova enacted law that would mandate chemical castration for those who have sex with persons under the age of 15. Additionally, rapists would face castration on a case-by-case basis. The Associated Press also reported that Moldovans had a perception that their country had become a sex tourism destination and that every five of the nine convicted child sex offenders in the country over the past two years were foreigners.