What happens inside a compost pile

A compost pile works through the action of billions of microorganisms—bacteria, fungi, and other decomposers—that eat the organic matter you add and convert it into a dark, crumbly, nutrient-rich material called humus. You create the conditions these organisms need: the right mix of carbon-rich materials (dry leaves, paper, wood chips) and nitrogen-rich materials (grass clippings, food scraps, manure), enough moisture to keep them active, and enough air so they can breathe. The pile heats up as microbes work, sometimes reaching 140°F or higher in the center, which speeds decomposition and kills weed seeds and pathogens.

The process happens in stages. First, fast-growing bacteria colonize the fresh materials and begin breaking down the easiest-to-digest compounds. As the pile heats up, thermophilic (heat-loving) bacteria take over and work most aggressively. After several weeks to months, the temperature drops, and fungi and slower-growing organisms finish the job, breaking down tougher materials like lignin in wood. The result is finished compost—dark, earthy-smelling, and ready to mix into garden beds or potted plants.

Key Takeaways

  • Microorganisms in the pile consume organic matter and produce heat as a byproduct, which accelerates decomposition and kills harmful pathogens and weed seeds.
  • A working pile needs a balance of carbon materials (leaves, paper) and nitrogen materials (grass, food scraps) in roughly a 30:1 ratio by weight.
  • Moisture and air are essential—the pile should feel like a wrung-out sponge, and turning it weekly or every few weeks speeds the process by introducing oxygen.
  • Hot composting (actively managed piles) produces finished compost in 2 to 6 months, while cold composting (passive piles) takes 6 months to 2 years.
  • Finished compost is dark brown or black, crumbly, and smells like forest soil—not like the materials you put in.

Carbon and nitrogen: the fuel ratio that matters

Microorganisms need both carbon and nitrogen to build their bodies and generate energy. Carbon comes from dry, woody materials—leaves, straw, shredded paper, wood chips, cardboard. Nitrogen comes from fresh, green materials—grass clippings, vegetable scraps, coffee grounds, manure, plant trimmings. The ideal ratio is roughly 30 parts carbon to 1 part nitrogen by weight, though home piles rarely need to be exact.

If your pile has too much carbon (mostly dry leaves and wood), decomposition slows because microbes run out of nitrogen to build new cells. If it has too much nitrogen (mostly fresh grass and food scraps), the pile can become slimy, smell like ammonia, and attract flies. The easiest way to balance is to alternate layers: a few inches of leaves or shredded paper, then a few inches of grass clippings or food scraps, then repeat. Over time, as you add materials, the ratio tends to self-correct.

Moisture and air: keeping microbes alive

Decomposing microorganisms need water to survive and reproduce, but they also need oxygen. The pile should feel like a wrung-out sponge—damp throughout, but not waterlogged. If it is too dry, decomposition nearly stops. If it is soaked, air pockets fill with water, oxygen runs out, and anaerobic bacteria take over, producing methane and hydrogen sulfide (the rotten-egg smell).

Turning the pile—mixing it with a pitchfork or shovel—is the most direct way to add air and speed decomposition. A pile turned weekly or every two weeks can produce finished compost in 2 to 6 months. A pile left alone (cold composting) still decomposes, but slowly, taking 6 months to 2 years. Rain and watering keep the pile moist; in dry climates, you may need to water every week or two. In wet climates, a cover or roof over the pile prevents it from becoming waterlogged.

The temperature cycle and what it tells you

A well-built compost pile heats up within days as bacteria colonize the fresh materials and begin breaking them down. The center of the pile can reach 130°F to 160°F or higher—hot enough that you cannot hold your hand in it. This heat is a sign that decomposition is happening fast. The high temperature also kills weed seeds, pathogens, and insect larvae, which is why hot compost is safer to use around vegetables than cold compost.

After 2 to 4 weeks, the pile begins to cool as the most readily available food sources are consumed. The temperature drops to ambient (surrounding air) temperature over the next few weeks or months. At this point, fungi and slower-growing organisms take over, breaking down tougher materials. The pile may heat up again if you turn it and introduce fresh materials, but eventually it stabilizes at a warm or cool temperature and stops shrinking. That is when it is ready to use.

What does and does not belong in the pile

Add: vegetable and fruit scraps, coffee grounds and tea bags, grass clippings, leaves, straw, hay, shredded paper and cardboard, wood chips, plant trimmings, manure from herbivores (horse, cow, chicken, rabbit). These materials break down readily and feed the microbes.

Do not add: meat, fish, bones, dairy, oils, or fats—these attract rats and other pests and can smell terrible. Do not add diseased plants or weeds with seeds, because even a hot pile may not kill all pathogens or seeds. Do not add pet waste (dog or cat feces), which can harbor parasites harmful to humans. Do not add treated wood, glossy paper, or synthetic materials, which do not break down or may leach chemicals.

Cold piles versus hot piles: which is right for you

A hot pile is actively managed: you build it all at once with a good mix of carbon and nitrogen, keep it moist, and turn it regularly (weekly or every two weeks). It heats up quickly, decomposes fast (2 to 6 months), and kills pathogens and weed seeds. Hot piles work well if you have a lot of materials on hand and want finished compost soon.

A cold pile is passive: you add materials as you have them, do not turn it, and let time do the work. It never gets very hot, decomposes slowly (6 months to 2 years), and may not kill all weed seeds or pathogens. Cold piles work well if you generate scraps gradually and do not mind waiting. Many home gardeners use a hybrid approach: they maintain one pile actively while adding to a second pile passively, so they always have finished compost coming.

Signs your pile is working and when it is done

A working pile shrinks visibly over weeks—sometimes by half its original volume or more. It smells earthy and warm, not rotten. The center is noticeably hot to the touch (in a hot pile). You may see steam rising on cool mornings. Worms, beetles, and other invertebrates move in, which is a good sign—they are helping break things down.

Finished compost is dark brown or black, crumbly, and falls apart in your hand. It smells like rich forest soil. You should not be able to recognize the original materials—no whole leaves, no chunks of wood, no identifiable food scraps. If you see these things, the pile needs more time. Finished compost is ready to mix into garden beds, blend with potting soil, or use as mulch around plants.

Frequently Asked Questions

Why does my pile smell like ammonia or rotten eggs?

That smell means the pile is waterlogged or has too much nitrogen and not enough air. Turn the pile to add oxygen, and mix in dry carbon materials like leaves or shredded paper. If it is soaking wet, stop watering and consider adding a cover to shed rain.

Can I compost cooked food or oil?

Cooked food and oils should not go in a home compost pile. They attract rats and other pests, break down slowly, and can create odor problems. Stick to raw vegetable and fruit scraps, coffee grounds, and plant material.

How do I know if my compost is hot enough to kill weed seeds?

A hot pile reaches at least 130°F in the center and stays there for several weeks. If you do not have a compost thermometer, assume a pile that heats up noticeably and shrinks quickly is hot enough. Cold piles may not kill all seeds, so avoid using their compost around vegetable beds if you are concerned about weeds.

Can I use finished compost right away or does it need to cure?

Finished compost can be used when ready in garden beds and potted plants. Some gardeners let it sit for a few weeks after it cools to allow any remaining decomposition to finish, but this is not required. If it smells sour or looks wet, let it dry out for a week or two before using.

What if I do not have room for a big pile?

You can compost in a small bin, a tumbler, or even a buried container in the ground. The same rules explore: balance carbon and nitrogen, keep it moist, and add air. Smaller systems decompose slower because they do not heat up as much, but they work fine for gradual composting in limited space.