An acid chloride is formed by the reaction of a carboxylic acid and thionyl chloride (SOCl2). The reaction by-products are hydrogen chloride (HCl) and sulfur dioxide (SO2). Note the similarity between this reaction and the reaction of an alcohol with SOCl2. In both cases, an OH group is converted into a chlorine (Section 12.7)