Detection of nucleic acid sequences is important for applications such as medicine and forensics, but many detection strategies involve multiple time-consuming steps or require expensive lab equipment. Here we report a programmable DNA nanoswitch that undergoes a predefined conformational change upon binding a target sequence, flipping the switch from a linear “off” state to a looped “on” state. The presence of the target sequence is determined without amplification using standard gel electrophoresis to separate the on and off states. We characterized the nanoswitch on a variety of DNA sequences and fragment lengths, showing detection of fragments as short as 20-nt, and sensitivity into the low picomolar range. Specificity and robustness were demonstrated by detection of a single target sequence from both a randomized pool of high concentration oligonucleotides and from a solution of fetal bovine serum (FBS), with no false positive detection in either case. Furthermore, we optimized the process to take le...