Mycoplasma pneumoniae is an important respiratory pathogen, accounting for up to 25% of community-acquired pneumonia, and is a common cause of hospitalized pneumonia in otherwise healthy adults and children. Mycoplasma pneumoniae isolates can be classified into two main genomic groups (type 1 and type 2) based on sequence variation within the gene encoding the major adhesion molecule P1. Although numerous publications have described real-time PCR assays for the detection of M. pneumoniae, none has been able to discriminate the two genomic types. Here, a real-time PCR assay that can distinguish each type of M. pneumoniae utilizing high-resolution melt-curve analysis is reported. Using this method, 102 isolates obtained from patients from 1965 to the present, including those from recent outbreaks, were typed along with reference strains M129 (type 1) and FH (type 2). The results show that 55 isolates (54%) can be classified as type 1 and 47 isolates (46%) as type 2, and 100% correlation was demonstrated when compared with a standard PCR-restriction fragment length polymorphism typing procedure. Typing of isolates obtained from recent outbreaks in the USA has revealed the presence of both types. This assay provides a rapid, reliable and convenient method for typing M. pneumoniae isolates and may be useful for surveillance purposes and epidemiological investigations, and may provide insight into the biology of M. pneumoniae distribution within populations.