Abstract. This paper reviews the chemistry of star-forming regions, with an emphasis on the formation of high-mass stars. We first outline the basic molecular processes in dense clouds, their implementation in chemical models, and techniques to measure molecular abundances. Then, recent observational, theoretical and laboratory developments are reviewed on the subjects of hot molecular cores, cosmic-ray ionization, depletion and deuteration, and oxygen chemistry. The paper concludes with a summary of outstanding problems and future opportunities.