N,O- and N,S-azoles and -azolines are common functional groups in pharmaceuticals, agrochemicals and natural products. Their fate during ozone-based water treatment processes is unknown due to a lack of kinetic and mechanistic information on their reactions with ozone. Apparent second-order rate constants kO3 of 12 model compounds were determined at pH 7: oxazoles react 2 orders of magnitude faster (kO3 = 9 × 102-5 × 104 M-1s-1, depending on their substituents) than thiazoles (kO3 = 1 × 101-2 × 103 M-1s-1). The low kO3 of thiazoles limits their degradability during ozonation. Only small yields of reactive oxygen species (•OH, H2O2, and 1O2) were observed during ozonation of oxazoles, suggesting that all oxygen atoms from ozone are incorporated into the products. Oxazoles and thiazoles react initially by a Criegee-type reaction at the C=C double bond, followed by two reaction branches, leading to two observed product groups: (1) carboxylates and cyanate; (2) formate, amide and CO2. For thiazoles, thiocarboxylic acids were identified as intermediates, reacting further to sulfate and carboxylic acids, forming 1O2. The nonaromatic 2-methyloxazoline is unreactive toward ozone. 2-Methylthiazoline reacts fast (kO3 = 2 × 104 M-1s-1), forming 1O2, leading to ring-opening and formation of dimerization products which react further to N-acetyltaurine. These results enhance the understanding of the ozone reactivity of heterocycles and help predict transformation product formation.