Diacetyl is a flavor compound present in most beers (and many wines), imparting aroma characteristics described as butter, butterscotch, or buttermilk when detected above its flavor threshold of 0.04 mg/l. It is often added to food products to evince a buttery flavor and aroma. Diacetyl (butane 2,3 dione) is generated as a by-product of amino-acid metabolism in yeast during fermentation. A related compound, pentane 2,3 dione, is also produced by the same mechanism but does not have as significant an impact on flavor. The butane and pentane 2,3 diones are collectively known as vicinal diketones.

Yeast excretes a precursor into the fermenting beer, where it breaks down chemically to produce diacetyl. However, the diacetyl is subsequently reabsorbed by the yeast cell and converted to a compound with no significant flavor characteristics. Failure to reabsorb the diacetyl can result in the beer retaining an unacceptably high level of diacetyl. It is essential that the raw beer is left in contact with the yeast for long enough for the diacetyl to be converted. Yeasts that separate out too early in the fermentation process, often the result of early application of cooling, can fail to complete the reabsorption. Diacetyl is particularly unwelcome in lager-style beers and these beers are often held for a time before cooling is applied, a process known as “warm conditioning” or “diacetyl rest.” For this reason, many lager brewers will allow a short-term rise of fermentation temperature to 60°F (15.5°C) or higher at the end of the fermentation.

At low to moderate levels, diacetyl can be perceived as a positive flavor characteristic in some ales and stouts. The amount of diacetyl produced is yeast strain-dependent but wort composition and fermentation conditions are also significant contributors to overall diacetyl levels. Diacetyl can also be formed by certain beer spoilage bacteria (within the group known as lactic acid bacteria), most notably during post-fermentation storage and sometimes in unsanitary beer lines (that is, plastic tubing not cleaned properly) between a keg of beer and the dispense tap.