In chemistry, the haloform reaction (also referred to as the Lieben haloform reaction) is a chemical reaction in which a haloform (CHX3, where X is a halogen) is produced by the exhaustive halogenation of an acetyl group (R−C(=O)CH3, where R can be either a hydrogen atom, an alkyl or an aryl group), in the presence of a base. The reaction can be used to transform acetyl groups into carboxyl groups (R−C(=O)OH) or to produce chloroform (CHCl3), bromoform (CHBr3), or iodoform (CHI3). Note that fluoroform (CHF3) can't be prepared in this way.