Detection and purification of nucleic acids from complex and dilute samples remains a challenging task for many biological applications, including low-level pathogen detection, extraction of DNA from unculturable organisms in environmental samples, and recovery of high molecular weight DNA. We have developed a prototype instrument based on a novel platform technology for efficiently purifying and concentrating even very low levels of nucleic acids from complex samples where the majority of existing isolation techniques fail. This instrument uses two-dimensional nonlinear electrophoresis to recover DNA or RNA from as low as zeptomolar concentrations, and to recover DNA fragments up to 1Mb in length without shearing, as no centrifugation, filtration or fluid-flow are necessary. Virtually any fluid sample containing nucleic acids of interest, including cellular lysate (without requiring any filtration to remove cell debris or particulates), can be placed in a loading chamber for concentration. Nucleic acids are then electrophoretically injected into a concentration medium, and time varying electric fields are applied using a novel method termed SCODA (Synchronous Coefficient of Drag Alteration) so that nucleic acids migrate towards a common focus location. Since this method acts only on molecules with highly nonlinear electrophoretic response, it preferentially concentrates nucleic acids over other molecules including contaminants and salts. This instrument represents a highly automated general method for simple, inexpensive concentration of nucleic acids, with which we have demonstrated direct extraction of DNA from soil and other environmental samples, recovery of high molecular weight DNA, and detection of DNA at zeptomolar concentrations.