Photoactivable toxins targeting ion channels have great potential to control cell activity. Here the authors report HwTxIV-Nvoc, a UV light-cleavable and photoactivatable peptide that targets voltage-gated sodium channels; they validate this in cells, brain slices and in vivo on mice neuromuscular junctions.