Fentanyl, also spelled fentanil, is a potent opioid used as a pain medication. Together with other drugs, fentanyl is used for anesthesia. It is also used illicitly as a recreational drug, sometimes mixed with heroin, cocaine, benzodiazepines or methamphetamine.