The Coral Reef Ecosystem — An Underwater City of Life
A coral reef ecosystem is a community of living things — corals, algae, fish, invertebrates, microbes, turtles, sharks and more — that lives on and around the limestone structure built by reef-building corals, together with the non-living conditions that support them, such as sunlight, warm clear water and dissolved minerals. The ecosystem runs largely on sunlight captured by zooxanthellae, microscopic algae living inside coral tissue. Coral reefs cover well under 1% of the ocean floor but support roughly a quarter of all known marine species, which is why they are often called the rainforests of the sea.
A healthy coral reef looks like a city: tall coral towers and branching thickets, crowded streets of fish, cleaning stations where customers queue for service, nurseries for the young and predators patrolling the edges. It is a fitting comparison, because a reef is a built environment. Corals construct the physical framework over centuries, and thousands of other species move in to use it. This page explains how the coral reef ecosystem works: who lives there, where the energy comes from, how species depend on one another, and why the whole system is so vulnerable to change.
The foundation: corals and their algae
Everything on a reef depends on a partnership between a tiny animal and an even tinier alga.
Reef-building corals are colonies of small animals called polyps, relatives of sea anemones and jellyfish. Each polyp secretes a cup of calcium carbonate beneath itself, and over generations these skeletons build up into the massive structures we call reefs. Living inside the polyps’ tissues are millions of single-celled algae called zooxanthellae. The algae photosynthesise and pass most of the sugars they make to the coral, while the coral provides shelter and nutrients. This partnership lets corals grow quickly in clear tropical water that is naturally low in nutrients.
Corals also feed themselves by catching plankton with stinging tentacles, especially at night. Together, the algae’s food and the coral’s own hunting provide the energy that builds the reef. Learn more on the biotic factors of the coral reef page.

Who lives on a coral reef?
Reefs host an extraordinary mix of life, from microbes and sponges to sharks, turtles and dolphins.
Beyond the corals themselves, reefs are home to more than 4,000 species of fish, including parrotfish, surgeonfish, butterflyfish, angelfish, damselfish, wrasses, groupers, snappers and reef sharks. Invertebrates are even more diverse: sponges, sea anemones, soft corals, sea fans, giant clams, octopus, cuttlefish, shrimp, crabs, lobsters, sea stars, sea urchins, sea cucumbers, nudibranchs and countless worms. Sea turtles feed on sponges, seagrass and algae, while dolphins, rays and, in some regions, dugongs and manatees visit reefs and nearby habitats. Many reef species are still undescribed, especially small invertebrates hidden inside the reef framework.
Diversity is not spread evenly. It peaks in the Coral Triangle, the region spanning Indonesia, the Philippines, Malaysia, Papua New Guinea, Timor-Leste and the Solomon Islands, which holds the greatest variety of reef-building corals and reef fish on Earth. Diversity generally declines with distance from this hotspot, so Caribbean and Red Sea reefs have fewer species, though many unique ones. See the coral reef ecosystem animals page for more.
How energy flows: the coral reef food web
Producers capture sunlight, grazers eat the producers, predators eat the grazers, and decomposers recycle everything.
| Role | Examples | What they do |
|---|---|---|
| Primary producers | Zooxanthellae, turf algae, coralline algae, seagrass, phytoplankton | Turn sunlight into food |
| Herbivores | Parrotfish, surgeonfish, rabbitfish, sea urchins, turtles | Graze algae and keep space open for coral |
| Planktivores & filter feeders | Corals, damselfish, sponges, giant clams | Strain food from the water |
| Predators | Groupers, snappers, moray eels, octopus, reef sharks | Control populations of smaller animals |
| Detritivores & decomposers | Sea cucumbers, worms, crabs, bacteria | Recycle waste and dead matter into nutrients |
A reef is remarkably good at recycling. Nutrients pass from algae to coral, from fish waste back to algae, and from detritus to bacteria and back into the water, so very little is lost. That efficiency explains what is sometimes called Darwin’s paradox: how such rich ecosystems thrive in nutrient-poor tropical seas. Herbivores play an especially important role. By grazing seaweed, they stop it from overgrowing the corals. When herbivores are overfished, reefs can shift from coral to seaweed, as happened in Jamaica. The full picture is on the coral reef food web page.

Partnerships that hold the reef together
Reefs are full of close relationships in which species help each other survive.
The coral-algae partnership is only the start. Clownfish live among the stinging tentacles of sea anemones, gaining protection while helping keep the anemone clean. Cleaner wrasse and cleaner shrimp run “cleaning stations” where larger fish line up to have parasites removed. Certain gobies share burrows with nearly blind pistol shrimp, acting as lookouts in exchange for a home. Some crabs and shrimp live inside coral colonies and defend them against coral-eating predators. These partnerships make the reef more stable and resilient, and they are part of why losing a single key species can have effects that ripple through the whole system.
Reef zones and connected habitats
A reef is not uniform: different zones support different communities, and nearby mangroves and seagrass beds are part of the same system.
From shore outwards, a typical reef includes a shallow lagoon or back reef, a reef flat, a reef crest where waves break, and a fore-reef slope dropping into deeper water. Each zone has different light, wave energy and depth, so each supports a different mix of corals and animals. The fore-reef usually has the highest coral diversity, while the crest is dominated by robust, wave-resistant species. See the reef zones page for details.
Reefs also depend on neighbouring ecosystems. Mangrove forests and seagrass meadows act as nurseries for many reef fish, trap sediment and filter nutrients before they reach the coral, while reefs shelter those habitats from waves. Fish and invertebrates move between them daily or as they grow. Protecting a reef therefore often means protecting the whole coastal system, as explained on the reefs and coastal ecosystems page.
Why the coral reef ecosystem matters, and what threatens it
Reefs feed and protect hundreds of millions of people, but they are among the most threatened ecosystems on Earth.
Coral reefs provide food, coastal protection, tourism income and ingredients for medicines; their total value has been estimated at around US$2.7 trillion a year, as explained on the ecological goods and services page. Yet they are highly sensitive. Marine heatwaves cause mass bleaching, and the Global Coral Reef Monitoring Network found that about 14% of the world’s coral was lost between 2009 and 2018. Ocean acidification makes it harder for corals to build skeletons. Overfishing, pollution, sediment runoff, coral disease, destructive fishing and coastal development add local pressure. Because so many species depend on the coral framework, losing the coral means losing much of the ecosystem. The main threats are covered on the coral reef threats page, and solutions on coral reef conservation.

See also: Ecosystem Services of Coral Reefs.
Related on TheSea
What is a coral reef ecosystem?
It is the community of organisms that live on and around a coral reef, together with the physical conditions that support them. Reef-building corals create the structure, and thousands of species of fish, invertebrates, algae and microbes depend on it.
What are the producers in a coral reef ecosystem?
The main producers are zooxanthellae living inside corals, along with turf algae, coralline algae, seaweeds, seagrasses and phytoplankton. They use sunlight to make the food that powers the reef food web.
Why are coral reefs so biodiverse?
The complex three-dimensional structure of a reef creates countless places to live, feed and hide, and warm, stable, sunlit water supports high productivity. Efficient nutrient recycling and many close partnerships between species also allow many species to coexist.
How many species live on coral reefs?
Coral reefs are thought to support around a quarter of all known marine species, including more than 4,000 species of fish and hundreds of species of reef-building coral. Many more reef species have not yet been described.
What happens to the ecosystem if the coral dies?
Without living coral, the reef stops growing and slowly erodes. Seaweed often takes over, shelter disappears, and many fish and invertebrates decline or leave, reducing biodiversity, fisheries and coastal protection.
Where are coral reef ecosystems found?
Shallow-water coral reefs are found mainly in warm, clear tropical seas between about 30°N and 30°S, with the greatest diversity in the Coral Triangle of South-East Asia. Cold-water coral reefs also exist in deep water worldwide.
- NOAA Ocean Service and NOAA Coral Reef Conservation Program: coral reef ecosystems
- Souter et al. (eds.) (2021), Status of Coral Reefs of the World: 2020, GCRMN
- Spalding, Ravilious & Green (2001), World Atlas of Coral Reefs, UNEP-WCMC
- Veron et al. (2009), Delineating the Coral Triangle, Galaxea
Blane Perun has been exploring Earth’s oceans and marine life for over 25 years. Founder of TheSea.Org in 1999, underwater photographer, coral aquaculture pioneer, and explorer of 80+ countries.
About Blane Perun → More on Coral Reefs →