CRISPR/Cas systems offer a powerful sensing mechanism to transduce sequence-specific information into amplified analytical signals. However, performing multiplexed CRISPR/Cas assays remains challenging and often requires complex approaches for multiplexed assays. Here, a hydrogel-based CRISPR/Cas12 system termed CLAMP (Cas-Loaded Annotated Micro-Particles) is described. The approach compartmentalizes the CRISPR/Cas reaction in spatially-encoded hydrogel microparticles (HMPs). Each HMP is identifiable by its face code and becomes fluorescent when target DNA is present. The assay is further streamlined by capturing HMPs inside a microfluidic device; the captured particles are then automatically recognized by a machine-learning algorithm. The CLAMP assay is fast, highly sensitive (attomolar detection limits with preamplification), and capable of multiplexing in a single-pot assay. As a proof-of-concept clinical application, CLAMP is applied to detect nucleic acid targets of human papillomavirus in cervical brushing samples.