Most explanations of composting move quickly to the practical: build a heap, mix your greens and browns, turn it now and then. That advice is sound, but it skips the more interesting question. What is actually happening inside the pile, and why does the same apple core turn into dark, crumbly soil food in a compost bin yet become a source of a potent greenhouse gas when it goes to landfill? The answer is not really about gardening technique. It is about chemistry, and above all about oxygen.
The same scrap, two different fates
Decomposition is not one fixed process with one guaranteed result. When organic matter breaks down, the outcome depends heavily on the conditions the material finds itself in, and the single most important condition is whether oxygen is available. A banana skin in an open, airy heap and the identical skin buried under tonnes of compacted rubbish are both decomposing, but they travel down two chemically distinct roads to very different destinations.

Composting is built on aerobic decomposition, meaning it is carried out by microbes that need oxygen to do their work. Because those oxygen-breathing organisms dominate a well-managed heap, the microbes that generate methane never get established. As the US Environmental Protection Agency explains, in aerobic conditions the methane-producing microbes are not active, so methane is avoided. The carbon in your scraps leaves mostly as carbon dioxide and water, alongside the stable organic matter that becomes finished compost.
It is worth being precise about what leaving as carbon dioxide means, because it can sound like swapping one emission for another. The carbon in a vegetable peeling was pulled from the air by a plant only a season or two ago, so returning it as carbon dioxide simply closes a short, natural loop. Methane is a different matter: forced down the airless route, part of that same carbon is released in a form that holds far more heat, and that is the genuine climate cost. The point of composting is not to make waste vanish but to steer its carbon down the harmless path.
Bury that same material where air cannot reach it and the story changes completely. In a dense, saturated, oxygen-starved environment, a different microbial community takes charge. These organisms are anaerobic; they thrive precisely because there is no oxygen, and their metabolism releases methane as a by-product. The scrap has not disappeared, and it has not been made harmless. It has been converted into a gas that traps far more heat, molecule for molecule, than the carbon dioxide a compost heap would have released.
Why the landfill route matters so much
This is not a marginal problem confined to a few forgotten bin bags. Food waste makes up a striking share of what goes underground. The EPA estimates that food waste is about 24 percent of the material landfilled in the US, and because that food waste is wet, dense and quick to break down anaerobically, it punches well above its weight as a gas source. The same agency attributes about 58 percent of fugitive methane emissions from municipal landfills to landfilled food waste.
Put plainly, roughly a quarter of what is buried is responsible for well over half the methane escaping. That is the environmental case for composting stated in the clearest possible terms. Composting does not merely keep material out of the ground; it redirects the carbon down the aerobic path, where methane is never formed in the first place. The gas is avoided at source rather than captured afterwards. A landfill packs material tightly, sealing food away from air, which is close to ideal for the methane producers. A garden heap is the opposite: loose, shallow and open to the air, so the same food feeds a completely different set of microbes.
Inside the heap: a working microbial community
It helps to picture a compost pile as a habitat rather than a container. When you add fresh scraps, you feed a large and varied population of organisms, and different members take their turn as conditions shift.
The heating phase
In the early stages, ordinary microbes that prefer moderate warmth get to work on the easiest material: sugars, soft tissues and starches. Their combined metabolism generates heat, and as the interior of a healthy heap warms, heat-loving microbes become dominant. This warmer phase is where the pile does much of its heavy lifting, breaking down tougher matter and helping to see off many weed seeds and pathogens. Bacteria do most of this rapid work, while fungi and other specialists tackle the more stubborn, woody structures that resist quick breakdown.
The heat is a sign that the aerobic community is thriving, not a problem to be managed away. A heap that never warms is often too small to hold its own heat, too dry for the microbes to be active, or short of the nitrogen-rich material they need to multiply. One that warms and then cools sharply has usually run short of air or dried out, and turning it tends to bring it back to life.
The curing phase
As the readily available food is used up, the heap cools, and a slower curing phase begins. Now larger organisms return and join in: the worms, beetles, mites and springtails that fragment material physically and blend it together. The end product of all this activity is humus, a stable form of organic matter that no longer heats up or smells and that behaves quite differently in soil from the raw scraps you started with. Curing is worth the patience, since compost spread before it is finished can still be breaking down and can temporarily draw nitrogen out of the soil as it completes the job.
Three conditions keep the aerobic community in charge, and each one has a clear reason behind it.
- Air. Oxygen is the whole point. Turning the heap, or building it with enough coarse, bulky material to keep channels open, replenishes the oxygen that the microbes consume and keeps the anaerobic organisms from gaining a foothold.
- Moisture. The microbes live in thin films of water on the surfaces of the material, so a heap should feel like a wrung-out sponge: damp throughout but never waterlogged. Too dry and activity stalls; too wet and the water drives out air, tipping the balance towards the methane producers.
- A balance of materials. Microbes need both carbon for energy and nitrogen for building their bodies. Mixing carbon-rich browns such as dead leaves and cardboard with nitrogen-rich greens such as vegetable trimmings gives them a workable diet. Get the balance badly wrong and the process either crawls along or turns sour and smelly.
A bad smell is a useful diagnostic. A heap that reeks of ammonia or rotten eggs is usually telling you it has gone anaerobic in patches: too wet, too compacted, too little air. The remedy is almost always the same: loosen it, add dry bulky material and let oxygen back in.
Putting the science to work in the corner of a garden
Understanding the chemistry makes the practical choices obvious. Greens and browns are the two halves of the microbes’ diet. Greens are the moist, nitrogen-rich items: vegetable peelings, fruit scraps, coffee grounds and grass clippings. Browns are the dry, carbon-rich ones: fallen leaves, torn cardboard, shredded paper and straw. A heap tilted heavily towards greens tends to go wet and smelly, while one that is almost all browns sits inert because the microbes lack the nitrogen to grow. A sensible habit is to add a generous layer of browns for every batch of kitchen greens, then adjust by what you see and smell.
A short worked example shows how the pieces fit. Suppose a week produces a full caddy of wet, green kitchen scraps. Emptying that straight into a bin on its own gives the anaerobic microbes exactly the dense, airless, saturated conditions they prefer. Layering the same scraps with a couple of handfuls of shredded cardboard and a scoop of dry leaves does three things at once: it adds carbon to balance the nitrogen, it soaks up the excess moisture, and the coarse texture holds air channels open. The heap is now set to stay aerobic without any special equipment.
Turning is simply the manual way of putting air back. Every time the material is lifted and loosened, fresh oxygen reaches the centre where the microbes have used it up. There is no single correct schedule: a heap that stays sweet-smelling and keeps its warmth needs turning less often than one that has begun to smell or has cooled. A few items are best kept out of a home heap, including meat, fish and dairy, which attract pests and readily turn anaerobic.
What the finished material does for soil
The environmental benefit of composting does not end when the methane is avoided. The humus that comes out the other side is a genuinely valuable material, and again the reasons are physical and biological rather than a matter of faith. According to the EPA, compost improves soil structure, helps soil hold on to moisture and nutrients, and reduces the need for fertilisers.
Structure is the key idea here. Stable organic matter helps bind fine mineral particles into small crumbs, or aggregates, with pore spaces between them. Those pores are what let a soil breathe and drain while still holding water where roots can reach it. A soil rich in this kind of organic matter resists compaction, absorbs rainfall rather than shedding it, and stays workable. That is why the same compost can loosen a heavy clay and help a light sandy soil hold water that would otherwise drain straight through.
The nutrient story follows from the same material. Humus and the living microbes it supports hold nutrients in a form that is released slowly, in step with plant demand, rather than washing away with the first heavy shower. Feeding the soil in this way supports the wider community of organisms that make nutrients available to roots, which is a large part of why compost lets a gardener lean less heavily on manufactured fertiliser.
Seen this way, composting is a single continuous piece of chemistry with two payoffs at either end. At the front, keeping food scraps aerobic means the carbon leaves as carbon dioxide and stable matter instead of methane, so a source of emissions is never created. At the back, that stable matter returns to the ground and does practical work: holding water, storing nutrients and rebuilding soil structure. The heap in the corner of a garden is not just a tidier way to throw things away. It is a small, well-run chemical process that turns a waste problem into a soil resource, and it beats the bin because the science is genuinely on its side.
Frequently Asked Questions
Why does food waste in landfill produce methane?
When food is buried in landfill it breaks down without oxygen, and in those airless conditions microbes release methane, a potent greenhouse gas. The US Environmental Protection Agency attributes about 58 percent of the methane escaping from municipal landfills to food waste.
How is composting different from what happens in landfill?
Composting is aerobic, meaning it happens with oxygen. The EPA notes that methane-producing microbes are not active when oxygen is present, so composting avoids the methane the same scraps would release if buried. The material turns into a stable, soil-like product instead.
What does finished compost actually do for soil?
The EPA notes that compost improves soil structure, helps the ground hold moisture and nutrients, and reduces the need for added fertiliser. In practice that means healthier soil that needs less watering and feeding.
Do I need a garden to compost?
Not necessarily. A garden bin or heap is one option, but many areas offer council food-waste collection, and flats can use a sealed indoor system or a community drop-off. The right choice depends on your space and how much effort you want the routine to take.
What can go wrong with a home compost heap, and how do I fix it?
Most problems come from too little air or the wrong balance of materials. A smelly, slimy heap usually needs more dry brown material such as cardboard or dead leaves, and a turn to let air in. A dry heap that is not breaking down needs a little moisture and some fresh green scraps.