Quaternary ammonium compounds are salts of quaternary ammonium cations with an anion. They are prepared by alkylation of tertiary amines. The compounds are used in softener formulations in the textile industry and in hair conditioner formulas. In conservation, they are used as wood preservatives, and as surfactant fungicides in treatment of textiles and paper.