WTH?! WHY IS MY GARLIC BLUE ?!

Garlic Chemistry

Garlic contains an odorless sulfur compound called alliin. It also contains an enzyme called alliinase. When a bulb or clove of garlic is in its natural, whole state, the two chemicals have little interaction (and the garlic is relatively odorless). When you cut or crush the garlic, the alliin and alliinase are mixed, creating an organosulphate compound called allicin. This is what gives garlic its pungent odor and distinctive flavor. And that's why garlic gets only stronger the more you chop or crush it. 

When garlic is combined with an acid (such as vinegar), the allicin reacts with amino acids in the garlic to produce rings of carbon-nitrogen called pyrroles. Pyrroles linked together form polypyrroles, which throw colors. Four pyrroles clustered together create green (this is why chlorophyll is green). Three pyrroles linked together creates blue. 

A similar color-forming reaction can occur when the garlic is in contact with minerals from certain metals, including copper, aluminum, iron, and tin. The minerals can come from pots or pans made of those metals, or it can come from trace minerals in the water.

Can You Eat Blue or Green Garlic?

Garlic that has turned blue or green during pickling or cooking is perfectly safe to eat, and the presence of color has no effect on the garlic's flavor. Some cultures even prize colorful garlic. In China, garlic is deliberately pickled in such a way that it turns a jade-green and is consumed during the Lunar New Year, or Spring Festival. This "Laba garlic" has a sour, slightly spicy flavor and is considered both beautiful and healthful. 

This information was provided by The Spruce Eats