A lye is a metal hydroxide traditionally obtained by leaching wood ashes, or a strong alkali which is highly soluble in water producing caustic basic solutions. "Lye" most commonly refers to sodium hydroxide NaOH, but historically has been used for potassium hydroxide KOH.

Today, lye is commercially manufactured using a membrane cell chloralkali process. It is supplied in various forms such as flakes, pellets, microbeads, coarse powder or a solution. Lye has traditionally been used as a major ingredient in soap making.

Lyes are used to cure many types of food, including canned mandarin oranges, hominy, lye rolls, century eggs, pretzels, and bagels.

Lye in the form of both sodium hydroxide and potassium hydroxide is used in making soap. Potassium hydroxide soaps are softer and more easily dissolved in water than sodium hydroxide soaps. Sodium hydroxide and potassium hydroxide are not interchangeable in either the proportions required or the properties produced in making soaps.

Lyes are also valued for their cleaning effects. Sodium hydroxide is commonly the major constituent in commercial and industrial oven cleaners and clogged drain openers, due to its grease-dissolving abilities. Lyes decompose greases via alkaline ester hydrolysis, yielding water-soluble residues that are easily removed by rinsing.