Techniques to specifically modulate protein activity are needed to interrogate spatial effects in cellular processes. A genetically encoded method for site-specific protein–protein conjugation based on a photoclick chemical reaction has now been developed. This method permits rapid and irreversible reassembly of bioactive proteins from non-functional split fragment pairs with full spatiotemporal control in solution, biomaterials and living mammalian cells.