Nitriles can undergo either acid-catalyzed hydrolysis or base-catalyzed hydrolysis through a typical nucleophilic acyl substitution. Acid-catalyzed hydrolysis involves the treatment of nitriles under hot acidic conditions to give carboxylic acids. During the reaction, nitriles are first hydrolyzed to amides, which are then further hydrolyzed by heating with aqueous acid to yield carboxylic acid as the final product and an ammonium ion. Alternatively, hydrolysis of nitriles can also occur through a base-catalyzed reaction, where nitriles are first hydrolyzed to an amide in the presence of an aqueous base, followed by treatment with acid to give carboxylic acids. Notably, nitrile hydrolysis is an important pathway for preparing carboxylic acid, which proceeds via an amide intermediate. Overall, nitrile hydrolysis is a reversible reaction, where the carbon–nitrogen triple bonds of nitrile are replaced with three carbon–oxygen bonds, forming a carboxylic acid.