Natural gas forms underground from the remains of ancient organisms, mostly tiny marine plants and animals, that were buried under layers of sediment millions of years ago. It is primarily methane, which makes up about 85% of American natural gas, with smaller amounts of ethane, propane, and butane mixed in. The gas sits trapped in rock formations deep below the surface until it is extracted through drilling.
How Organic Matter Becomes Natural Gas
The process starts with microscopic organisms like plankton and algae that lived in ancient seas hundreds of millions of years ago. When they died, their remains sank to the ocean floor and were gradually buried under thick layers of mud, sand, and sediment. Cut off from oxygen, this organic material couldn’t fully decompose the way a leaf breaks down on a forest floor. Instead, it was slowly compressed and heated as it sank deeper into the earth over millions of years.
Two distinct processes create natural gas. At relatively shallow depths, where temperatures stay below about 50°C (122°F), microorganisms called methanogens break down the organic material and release methane as a byproduct. This is called biogenic gas, and it’s essentially the same process that produces swamp gas or the methane bubbling up from a landfill, just happening underground over longer timescales.
The second process, called thermogenic formation, happens much deeper underground where temperatures reach 157° to 221°C (about 315° to 430°F). At those extreme temperatures, the chemical bonds in buried organic matter crack apart, releasing methane and other hydrocarbon gases. Most of the natural gas we drill for today was created through this high-temperature process. Oil forms through a similar mechanism but at somewhat lower temperatures, which is why natural gas and oil deposits are often found near each other.
Where Natural Gas Gets Trapped
Once formed, natural gas migrates upward through porous rock until it hits an impermeable layer it can’t pass through. It collects there in what geologists call a reservoir. These reservoirs aren’t hollow underground caves. The gas fills tiny pore spaces within rock, similar to how water soaks into a sponge.
Three main rock types hold natural gas. Sandstone reservoirs have relatively large pore spaces and allow gas to flow freely, making them the easiest to tap. Shale formations hold gas in extremely fine-grained rock with very low permeability, meaning the gas is essentially locked in place unless the rock is fractured. Coalbed reservoirs store methane that was generated during the coal formation process, adsorbed onto the surface of coal itself.
Natural gas also falls into two categories based on its relationship to oil. Associated gas is produced alongside crude oil from the same well and gets separated at the surface. Non-associated gas comes from reservoirs that contain gas alone, with no crude oil present. Non-associated gas fields tend to produce cleaner, drier gas with a higher methane concentration.
How It Gets Out of the Ground
Conventional gas deposits in porous sandstone can be reached with a standard vertical well. The gas flows naturally toward the lower-pressure environment of the wellbore and rises to the surface. These are the easiest and cheapest deposits to produce.
Shale gas and other “tight” formations require more aggressive techniques. Horizontal drilling involves sending a drill bit straight down to the target depth, then gradually curving it until it runs sideways through the gas-bearing layer. This allows far more of the wellbore to stay in contact with the producing rock, dramatically increasing the amount of gas that can be recovered from a single well.
After the well is drilled, hydraulic fracturing (fracking) is used to crack the rock open. Fluid is pumped underground at extremely high pressure until the rock fractures. That fluid carries sand or similar small particles that wedge into the cracks and hold them open after the pressure is released. Gas then flows through those propped-open fractures, into the wellbore, and up to the surface. The combination of horizontal drilling and hydraulic fracturing transformed the natural gas industry, making it economically viable to produce gas from shale formations that were previously considered inaccessible.
Top Producing Countries
The United States is the world’s largest natural gas producer by a wide margin, generating roughly 39 quadrillion BTU in 2023. Much of that production comes from shale formations like the Marcellus Shale in the Appalachian region and the Permian Basin in Texas. Russia ranks second at about 23 quadrillion BTU, followed by Iran (10), China (8), and Canada (7). Together, the top five countries account for the majority of global output.
Renewable Natural Gas
Not all natural gas takes millions of years to form. Renewable natural gas (RNG) is produced from organic waste that decomposes today, and once it’s cleaned up to pipeline standards, it is chemically identical to fossil natural gas. The same basic biology is at work: microorganisms break down organic material in oxygen-free conditions and produce methane.
The main sources are landfills, where decomposing trash naturally generates methane that can be captured instead of released into the atmosphere; livestock operations, where animal manure is fed into sealed digesters designed to maximize methane output; and wastewater treatment plants, where the solids filtered from sewage produce biogas during digestion. Food waste from restaurants, supermarkets, and manufacturing facilities is another growing source. Some facilities also convert crop residues and woody biomass into gas through high-temperature chemical processes. RNG currently represents a small fraction of total natural gas supply, but it offers a way to produce the same fuel on a timescale of weeks rather than geological ages.

