In addition to proteins, microbes can use structured RNAs such as riboswitches for the important task of regulating gene expression. Riboswitches control gene expression by changing their structure in response to binding a small molecule and are widespread among bacteria. Here we determine the mechanism of regulation in a riboswitch that responds to corrinoids-a family of coenzymes related to vitamin B12. We report the alternative RNA secondary structures that couple corrinoid sensing with response in a repressing and novel activating corrinoid riboswitch. We then applied this knowledge to flipping the regulatory sign by constructing synthetic riboswitches that activate expression to a higher level than the natural one. In the process, we observed patterns in which sequence, in addition to structure, impacts function in paired RNA regions. The synthetic riboswitches we describe here have potential applications as biosensors.