Advances in biosensor engineering have enabled the design of programmable molecular systems to detect a range of pathogens, nucleic acids, and chemicals. Here, we engineer and field-test a biosensor for fluoride, a major groundwater contaminant of global concern. The sensor consists of a cell-free system containing a DNA template that encodes a fluoride-responsive riboswitch regulating genes that produce a fluorescent or colorimetric output. Individual reactions can be lyophilized for long-term storage and detect fluoride at levels above 2 ppm, the Environmental Protection Agency's most stringent regulatory standard, in both laboratory and field conditions. Through onsite detection of fluoride in a real-world water source, this work provides a critical proof-ofprinciple for the future engineering of riboswitches and other biosensors to address challenges for global health and the environment.