Roasting coffee transforms the chemical and physical properties of green coffee beans into roasted coffee products. The roasting process is what produces the characteristic flavor of coffee by causing the green coffee beans to expand and to change in color, taste, smell, and density. Unroasted beans contain similar acids, protein, and caffeine as those that have been roasted, but lack the taste. Heat must be applied for the Maillard and other chemical reactions to occur.
As green coffee is more stable than roasted, the roasting process tends to take place close to where it will be consumed. This reduces the time that roasted coffee spends in distribution, giving the consumer a longer shelf life. The vast majority of coffee is roasted commercially on a large scale, but some coffee drinkers roast coffee at home in order to have more control over the freshness and flavor profile of the beans.