This page looks at the hydrolysis of nitriles under either acidic or alkaline conditions to make carboxylic acids or their salts.
When nitriles are hydrolysed you can think of them reacting with water in two stages - first to produce an amide, and then the ammonium salt of a carboxylic acid. For example, ethanenitrile would end up as ammonium ethanoate going via ethanamide.
In practice, the reaction between nitriles and water would be so slow as to be completely negligible. The nitrile is instead heated with either a dilute acid such as dilute hydrochloric acid, or with an alkali such as sodium hydroxide solution. The end result is similar in all the cases, but the exact nature of the final product varies depending on the conditions you use for the reaction.
Acidic hydrolysis of nitriles
The nitrile is heated under reflux with dilute hydrochloric acid. Instead of getting an ammonium salt as you would do if the reaction only involved water, you produce the free carboxylic acid.
For example, with ethanenitrile and hydrochloric acid you would get ethanoic acid and ammonium chloride.
\[ CH_3CN + 2H_2O + HCl \longrightarrow CH_3COOH + NH_4Cl\]
Why is the free acid formed rather than the ammonium salt? The ethanoate ions in the ammonium ethanoate react with hydrogen ions from the hydrochloric acid to produce ethanoic acid. Ethanoic acid is only a weak acid and so once it has got the hydrogen ion, it tends to hang on to it.
Alkaline hydrolysis of nitriles
The nitrile is heated under reflux with sodium hydroxide solution. This time, instead of getting an ammonium salt as you would do if the reaction only involved water, you get the sodium salt. Ammonia gas is given off as well.
For example, with ethanenitrile and sodium hydroxide solution you would get sodium ethanoate and ammonia.
\[ CH_3CN + H_2O + NaOH \longrightarrow CH_3COONa _ NH_3\]
The ammonia is formed from reaction between ammonium ions and hydroxide ions. If you wanted the free carboxylic acid in this case, you would have to acidify the final solution with a strong acid such as dilute hydrochloric acid or dilute sulphuric acid. The ethanoate ion in the sodium ethanoate will react with hydrogen ions as mentioned above.