By endowing light control of neuronal activity, optogenetics and photopharmacology are powerful methods notably used to probe the transmission of pain signals. However, costs, animal handling and ethical issues have reduced their dissemination and routine use. Here we report LAKI (Light Activated K channel Inhibitor), a specific photoswitchable inhibitor of the pain-related two-pore-domain potassium TREK and TRESK channels. In the dark or ambient light, LAKI is inactive. However, alternating transdermal illumination at 365 nm and 480 nm reversibly blocks and unblocks TREK/TRESK current in nociceptors, enabling rapid control of pain and nociception in intact and freely moving mice and nematode. These results demonstrate, in vivo, the subcellular localization of TREK/TRESK at the nociceptor free nerve endings in which their acute inhibition is sufficient to induce pain, showing LAKI potential as a valuable tool for TREK/TRESK channel studies. More importantly, LAKI gives the ability to reversibly remote-control pain in a non-invasive and physiological manner in naive animals, which has utility in basic and translational pain research but also in in vivo analgesic drug screening and validation, without the need of genetic manipulations or viral infection.