New sequencing technologies have made it possible to generate bacterial genomes at clinically relevant timescales and price levels. The use of whole-genome sequencing (WGS) has proved useful for investigating transmission at different scales. WGS data are highly effective at determining whether individuals are part of the same transmission chain, making it possible to detect probable direct transmission events, delimit the extent of local nosocomial or community-based outbreaks, and identify worldwide patterns of spread and long-term dynamics of bacterial pathogens. Making the most of WGS data will probably always require associated detailed epidemiological data, but nevertheless it promises to become an increasingly valuable tool for infection control in the near future.