Chemically triggered molecular switches for controlling the fate and function of biological systems are fundamental to the emergence of synthetic biology and the development of biomedical applications. We here present the first chemically triggered switch for controlling the infectivity of adeno-associated viral (AAV) vectors.