Chemosynthetic symbioses between bacteria and marine invertebrates were discovered 30 years ago at hydrothermal vents on the Galapagos Rift. Remarkably, it took the discovery of these symbioses in the deep sea for scientists to realize that chemosynthetic symbioses occur worldwide in a wide range of habitats, including cold seeps, whale and wood falls, shallow-water coastal sediments and continental margins. The evolutionary success of these symbioses is evident from the wide range of animal groups that have established associations with chemosynthetic bacteria; at least seven animal phyla are known to host these symbionts. The diversity of the bacterial symbionts is equally high, and phylogenetic analyses have shown that these associations have evolved on multiple occasions by convergent evolution. This Review focuses on the diversity of chemosynthetic symbionts and their hosts, and examines the traits that have resulted in their evolutionary success.