We present a new type of DNA switch, based on the Holliday junction, that uses a combination of binding and conformational switching to enable specific label-free detection of DNA and RNA. We show that a single RNA oligonucleotide species can be detected in a complex mixture of extracted cellular RNA and demonstrate that by exploiting different aspects of the switch characteristics we can achieve 30-fold discrimination between single-nucleotide mismatches in a DNA oligonucleotide.