Detection of viruses is critical for controlling disease spread. Recent emerging viral threats, including Zika virus, Ebola virus, and SARS-CoV-2 responsible for coronavirus disease 2019 (COVID-19) highlight the cost and difficulty in responding rapidly. To address these challenges, we develop a platform for low-cost and rapid detection of viral RNA with DNA nanoswitches that mechanically reconfigure in response to specific viruses. Using Zika virus as a model system, we show nonenzymatic detection of viral RNA with selective and multiplexed detection between related viruses and viral strains. For clinical-level sensitivity in biological fluids, we paired the assay with sample preparation using either RNA extraction or isothermal preamplification. Our assay requires minimal laboratory infrastructure and is adaptable to other viruses, as demonstrated by quickly developing DNA nanoswitches to detect SARS-CoV-2 RNA in saliva. Further development and field implementation will improve our ability to detect emergent viral threats and ultimately limit their impact.