Heat and Timing
When to add garlic so it does not turn bitter

Adding garlic with the onions at the start is the most common instruction in print, and the most common way to ruin a pan of food.
Garlic has far less water than an onion and far more sugar and amino acids, so it browns in seconds and burns soon after. The onion is still softening while the garlic is already past its best point.
The fix is a matter of timing and cut size, not of caution. Garlic can take high heat, briefly, if you know when to put it in and when to take the pan off.
Why garlic burns so much faster than onions
A clove is about 60 percent water, against nearly 90 percent for an onion. Less water means the surface dries and passes 300F much sooner.
Garlic also carries more free sugars and amino acids, the two things that brown. Put both facts together and the window between raw and burnt is narrow.
The pieces are small as well. A minced clove has far more surface per gram than a sliced onion, so it heats through almost at once.
What burns is not the whole clove but the fine particles. The garlic that sticks to the pan between other pieces is the first to go dark.
Burnt garlic tastes acrid and bitter, and the bitterness spreads into the fat. Once that happens the pan has to be washed, not rescued.
Water in the clove is what holds the temperature near boiling. As it leaves, the surface climbs past the browning point in a hurry.
Crushing a clove ruptures cells and releases an enzyme that turns sulfur compounds into the sharp ones. The finer the cut, the more of that happens.
That is why a whole clove is mild and a grated one is fierce, from the same head. The green shoot inside a clove is often blamed for bitterness, but burned garlic is the usual cause.
The window, measured in seconds
At a pan temperature around 350F, minced garlic goes from pale to gold in thirty to forty seconds. Sliced garlic takes about a minute. Whole cloves take several minutes.
The color is the clock. Garlic starts opaque white, turns translucent, then pale gold. Pale gold is the moment to add liquid or take the pan off the heat.
Tan is already late. Brown is burnt, and the difference between gold and brown is about ten seconds at that temperature.
The smell changes at the same rate. Raw garlic is sharp and sulfurous, gold garlic smells nutty and sweet, and burnt garlic smells like a struck match.
If you can smell the sharpness turning acrid, the pan is past the point where the garlic can be saved.
Dial settings are not temperatures. A pan reading 350F takes minced garlic to gold in under a minute, and one at 400F in half that.
Garlic also keeps cooking after it leaves the pan. A gold slice sitting in hot fat will be brown a minute later.
A thermometer helps once. Point it at the pan, note the dial position, and remember the setting where garlic lasts a minute rather than ten seconds.
Whole cloves behave differently again. Poached in oil for a sauce they take fifteen minutes and never brown, because their mass holds the surface cool.
Slot one: cold oil and low heat
The gentlest method is to put sliced or crushed garlic into fat before the pan is hot, and bring both up together over low heat.
As the fat warms, it pulls the flavor out of the garlic without ever reaching a temperature that browns it. The oil turns fragrant and the garlic turns soft and mild.
This method takes eight to ten minutes and cannot be hurried. Turning up the heat to speed it defeats the whole point.
This is how garlic oil is made, and it is the right approach when the garlic is the main flavor rather than a background note.
Watch the smallest pieces. They will start to color while the larger ones are still white, and they set the pace for when you turn the heat down.
Keep the heat low enough that the oil barely shimmers. If it starts to bubble around the garlic, the pan is already too hot for this method.
A few slow bubbles at the edge of a slice is the right pace. A hard bubble around every piece means the fat is closer to frying than to infusing.
Slot two: after the onions, before the liquid
For most savory dishes the order is onions first, garlic second. The onions need ten minutes. The garlic needs one.
Add the garlic when the onions are nearly done and the pan has room to be stirred. Push the onions to one side, put the garlic in the fat, and stir it for forty five seconds.
Then add the liquid, the tomatoes or the stock, and the temperature drops at once. That drop is what stops the garlic from going further.
If the dish has no liquid, take the pan off the heat before adding the garlic and let the residual warmth cook it. The pan holds enough heat for a minute of gentle cooking.
Minced garlic from a jar behaves differently. It is wetter and more processed, so it steams before it browns and can taste flat. Use a little more of it and add it later.
If the onions have thrown a lot of water, let the pan dry before the garlic goes in. Garlic added to a wet pan steams and never browns, which tastes raw.
Keep the garlic moving in the fat rather than on bare metal. Fat carries heat more gently than steel does.
When a recipe says garlic at the start, split it. Half at the start perfumes the oil, and half at the end keeps the sharpness.
The moment the garlic meets the fat, a pinch of salt on it draws water and slows the browning. That buys a few seconds when the onions are running behind.
Slot three: off the heat, at the end
Raw garlic has a heat of its own that cooked garlic loses. Some dishes want that, and the way to get it is to add the garlic last.
Grate or crush a clove into a sauce off the burner, or stir it into a dressing or a yogurt base. The flavor stays sharp and the texture stays loose.
For a garnish, slice garlic thin and fry it in a shallow pool of oil over medium low until it is pale gold, then lift it out at once. It keeps browning in its own heat.
The oil left behind is the useful part. Strain it, keep it cold, and use it to start the next dish.
Slice for chips evenly. Uneven slices put the thin ones past gold while the thick ones are still pale, and one burnt slice flavors the batch.
Raw garlic in a cold sauce needs ten minutes to settle. Served at once it tastes hot and one sided, and the rest of the bowl cannot correct it.
Whole heads take a different route entirely. Roasted in a hot oven, cut side down in oil, they turn soft and sweet in forty minutes, and there is no bitterness because the cloves stay whole and their surfaces never fully dry.
What to do in the next ten minutes
Put a pan on low heat with three tablespoons of oil and two crushed cloves. Let it come up slowly and watch the smallest pieces.
When the oil smells sweet and the garlic is pale, take it off the heat and set the pan aside. That is the flavor you were trying to keep.
Then start a second pan, cook your onions, and add the minced garlic only in the last minute. Stir it constantly and watch the color.
If it goes tan before the rest of the dish is ready, add a splash of water or stock. The steam stops the browning and the garlic finishes cooking in the liquid.
Taste a piece on its own. If it is sweet, the timing was right. If it bites at the back of the throat, it was either raw or burnt, and the color will tell you which.
If the pan smells acrid, stop. Sugar, acid or more liquid will not fix it, because the bitter compounds are dissolved in the fat.
Wipe the pan with a paper towel and a little oil and start again. Ten minutes of work is cheaper than a bitter dinner.