Goby at a burrow mouth on a reef, small mottled fish in sharp focus

Goby

REEF FISH GUIDE

Goby: the tiny fish that shares a burrow with a pistol shrimp

The goby is one of the smallest and most numerous fish on the reef — a tiny bottom-dweller that includes some of the smallest vertebrates known. Its most famous trick is a partnership with a nearly blind pistol shrimp: the shrimp digs the burrow, its partner stands guard, and the two live together for life.

By Emily Carter · Reviewed by our vet team · Updated 10 November 2026 · 8 min read

Includes the smallest vertebrates knownShares a burrow with a pistol shrimpAround 2,000 species worldwide
Goby at a burrow mouth on a reef, small mottled fish in sharp focus
Family: Gobiidae  ·  Home: Reefs, tide pools, streams  ·  Famous For: The shrimp partnership

At a Glance

SCIENTIFIC NAME
Family Gobiidae
SIZE
About 1 cm to 27 cm
WEIGHT
A few grams
LIFESPAN
Usually 1–3 years
DIET
Plankton, small crustaceans
HABITAT
Reefs, sand flats, streams
STATUS
Varies by species
FAMOUS FOR
Shrimp-goby partnership

The goby is a small bottom fish of the family Gobiidae, one of the largest fish families in the sea, with around 2,000 described species and more still undescribed. Gobies live almost everywhere in the ocean — on coral reefs, in tide pools, on sand flats, in estuaries and even in mountain streams — and they range in size from the dwarf pygmy, about a centimetre long and among the smallest vertebrates known, to the giant at about 27 centimetres. Most are only a few centimetres long, and most live on or near the bottom, where they perch, dart and hide.

What Is a Goby?

It is a small, bottom-living fish with a blunt head, large eyes set high on the head, and a distinctive feature: its two pelvic fins are fused into a suction cup. That cup lets it cling to rocks, coral and glass, holding still in a current or on a wave-washed rock. Gobies have no swim bladder, so they do not float in mid-water — they sit, hop and dart along the bottom, and they are usually mottled or striped to match the sand or rock they live on.

A shrimp goby at a burrow mouth with a pistol shrimp beside it

The family is enormous and varied. There are gobies that live in the open sea, gobies that live in freshwater streams, gobies that climb waterfalls, and gobies that live in the burrows of other animals. But the best-known gobies are the reef gobies, the little fish that perch on coral heads and watch the world go by. The shrimp-goby and pistol shrimp partnership explains the most famous goby relationship of all.

Size: From Tiny to Giant

Gobies span an extraordinary size range. The smallest, the dwarf pygmy, is about a centimetre long as an adult — small enough to sit on a fingertip, and one of the smallest vertebrates known to science. Most reef gobies are 3 to 10 centimetres, and the largest, the giant, reaches about 27 centimetres. One source’s family range of 50 to 55 centimetres conflicts with the documented maximum and is not used here.

Goby size: a dwarf pygmy goby, one of the smallest vertebrates known, on coral

Size shapes its life. Small gobies hide in coral branches, in empty shells and in the burrows of shrimps and worms, and they are food for almost everything on the reef. Larger gobies hold small territories on the sand or rock, and they can be bold, chasing off fish much bigger than themselves. Whatever the size, its body plan is the same: a blunt head, a fused pelvic suction cup, and a habit of sitting still and watching.

Species and Family

There are around 2,000 described species in the family, with more still being discovered and described every year — the family is one of the largest in the sea, and new species turn up in every survey of a reef. They are grouped in the family Gobiidae, and they include the shrimp gobies, the coral gobies, the mudskippers, the sleeper gobies and the freshwater gobies, each with its own way of life.

A giant goby for scale contrast, the largest of the family at about 27 cm

The variety is the point: a coral species lives its whole life in the branches of a single coral colony, a mudskipper spends half its life out of the water, and one of them shares a burrow with a shrimp. The family’s success comes from being small, adaptable and numerous — gobies are among the most abundant fish on many reefs, even though most divers barely notice them. The garden eel, a burrow neighbour on the sand flats, lives the same bottom-dwelling life in a different way.

Habitat: Reefs, Tide Pools and Streams

Gobies live almost everywhere water meets land. On coral reefs they perch on coral heads and hide in the branches; on sand flats they sit at burrow mouths; in tide pools they cling to the rock with their suction-cup fins and wait for the tide to return; in estuaries they live in muddy water; and in freshwater streams, some gobies climb waterfalls to reach the headwaters. A few species even live in the open ocean, clinging to floating debris.

A goby in a tide pool, clinging to the rock with its fused pelvic fins

The habitat shapes the fish. Reef gobies are bright and patterned to match coral; sand gobies are pale and speckled to match the sand; tide-pool gobies are tough, able to survive hours out of the water in a damp rock pool. Wherever they live, gobies stay close to cover — a rock, a coral branch, a burrow mouth — because almost everything on the reef eats gobies. The Types of Reef Fish guide covers the reef community gobies belong to.

The Pistol Shrimp Partnership

The shrimp partnership is one of the reef’s most famous friendships. A nearly blind pistol shrimp digs and maintains a burrow in the sand, and one stands guard at the burrow mouth. The shrimp keeps one antenna touching its partner at all times, and when it flicks its tail in alarm, the shrimp darts back into the burrow. The fish gets a safe home, and the shrimp gets a lookout it could not live without.

A goby pair at a burrow entrance, one standing guard while the shrimp digs

The partnership is so close that the two animals are rarely found apart. The shrimp digs, its partner watches, and they share the burrow for life — sometimes for years. If the fish is removed, the shrimp will not leave the burrow, and it will starve; if the shrimp is removed, the fish loses its home. It is a true mutualism, and it is one of the reasons the fish is so well known: the little fish at the burrow mouth, with the shrimp’s antenna on its tail, is a classic reef sight.

Goby Diet and Feeding

Gobies eat small food: plankton, tiny crustaceans, small worms and algae, picked from the water or from the sand. Reef gobies dart out from their perch to snatch a passing copepod, then dart back; sand gobies sift the sand for worms and small crustaceans; coral gobies pick at the coral branches for tiny invertebrates. They are opportunists, and they eat whatever small food is available.

A goby on a reef sand flat, sifting the sand for food

Feeding is a quick, watchful business. It feeds in short bursts, always ready to dart back to cover, because it is food for almost everything bigger than it. The suction-cup fins help here too — the fish can hold still on a rock in a current and pick at food without being swept away. Most gobies live only one to three years, so they feed, grow and breed fast, and their numbers are kept high by sheer abundance.

Fun Facts

  • The dwarf pygmy, about 1 centimetre long, is among the smallest vertebrates known.
  • Its two pelvic fins are fused into a suction cup that lets it cling to rocks and coral.
  • The fish and the pistol shrimp share a burrow for life — one digs, the other stands guard.
  • There are around 2,000 described species in the family, with more discovered every year.
  • Some gobies, the mudskippers, spend half their lives out of the water.
  • Gobies have no swim bladder, so they sit, hop and dart along the bottom instead of floating.

Frequently Asked Questions

How Many Species of Goby Are There?

There are around 2,000 described species in the family, with more still undescribed and new species found in almost every reef survey. Gobiidae is one of the largest fish families in the sea.

How Does the Goby and Pistol Shrimp Partnership Work?

A nearly blind pistol shrimp digs and maintains a burrow, and one stands guard at the burrow mouth. The shrimp keeps one antenna touching its partner, and when it flicks its tail in alarm, the shrimp darts inside. The fish gets a home and the shrimp gets a lookout.

What Is the Smallest Goby?

The dwarf pygmy is about 1 centimetre long as an adult, and it is among the smallest vertebrates known to science. Most reef gobies are 3 to 10 centimetres long.

How Big Do Gobies Get?

Most gobies are 3 to 10 centimetres long. The smallest, the dwarf pygmy, is about 1 centimetre, and the largest, the giant, reaches about 27 centimetres.

Where Do Gobies Live?

Gobies live almost everywhere: on coral reefs, in tide pools, on sand flats, in estuaries, in freshwater streams, and a few even cling to floating debris in the open ocean. Most stay close to cover on or near the bottom.

What Do Gobies Eat?

Gobies eat plankton, tiny crustaceans, small worms and algae. Reef gobies dart out to snatch passing copepods, sand gobies sift the sand for worms, and coral gobies pick tiny invertebrates from coral branches.

How Long Do Gobies Live?

Most gobies live only one to three years. They feed, grow and breed fast, and their numbers stay high through sheer abundance, even though they are food for almost everything bigger than them on the reef.

Similar Species Worth Exploring

Keep Exploring

Keep exploring the reef fish through the garden eel, its burrow neighbour on the sand flats, the pipefish, the straight-bodied seahorse relative, and the wider world of the types of fish. No fish is smaller, tougher or better partnered than the goby.

Similar Posts