A variety of pathogenic bacteria can infect humans, and rapid species identification is crucial for the correct treatment. However, the identification process can often be time-consuming and depend on the cultivation of the bacterial pathogen(s). Here, we present a stand-alone, enzyme-free, optical DNA mapping assay capable of species identification by matching the intensity profiles of large DNA molecules to a database of fully assembled bacterial genomes (>10 000). The assay includes a new data analysis strategy as well as a general DNA extraction protocol for both Gram-negative and Gram-positive bacteria. We demonstrate that the assay is capable of identifying bacteria directly from uncultured clinical urine samples, as well as in mixtures, with the potential to be discriminative even at the subspecies level. We foresee that the assay has applications both within research laboratories and in clinical settings, where the time-consuming step of cultivation can be minimized or even completely avoided.