The potential of clustered regularly interspaced short palindromic repeats (CRISPR) and corresponding CRISPR-associated (Cas) protein systems (CRISPR/Cas) systems for biomedical applications is tremendous; however, precise control of their activity is essential to better harness this potential and, beyond this, to develop reliable diagnostic reagents. Herein, we report on such a strategy by controlling the CRISPR/Cas12a activity using a photo-controllable CRISPR RNA (crRNA). To this end, the 3' end of crRNA was conjugated to a G-quadruplex (G4) block through a photocleavable linker: upon photo irradiation, the G4 trigger is removed, thus allowing for the DNA target to access and hybridize with the crRNA, and thus be processed by the CRISPR/Cas12a system. The efficiency of this approach was demonstrated by the detection of human papillomavirus 16 DNA in 50 clinical samples: our one-pot strategy was found to be as efficient as the routinely implemented method (qPCR), with 95.7% sensitivity and 100% specificity, in addition to be faster (25 versus 60 min) and both simpler and less expensive (being implementable as lateral flow test strips). Collectively, this new and fully controllable CRISPR/Cas system holds great potential for next-generation clinical diagnostics.