Quick Take
- This caterpillar's chemical weapon stops some predators cold while leaving one common threat completely unfazed. See which predators it stops →
- The osmeterium's smell isn't the foul stench you'd expect. People describe it in wildly contradictory ways. Explore the contradictory scents →
- The gland's chemical signature is not fixed, and something changes it over time in a way scientists did not fully anticipate. See how the chemicals change →
- The bright color isn't just for show. It's doing something specific before the chemical defense even activates. Learn how the color warns predators →
The beautiful and elegant swallowtail butterfly begins its life as a chubby caterpillar with an unusual defense. When threatened, a swallowtail caterpillar rears up its head and sticks out a yellow or orange forked gland called the osmeterium. This gland releases a foul-smelling chemical that wards off predators. Just how does it work, and is it actually effective at chasing away threats? And perhaps the biggest question of all is: what does its defensive spray smell like? Read on to find out.

All species of swallowtail butterflies possess an osmeterium as a defense against predators.
©Thomas Woolsey/Shutterstock.com
A Built-In Defense Across All Swallowtails
All species of swallowtail butterflies (family Papilionidae) have an osmeterium during the caterpillar stage. There are around 600 species of swallowtails, with around 30 living in North America. These beautifully patterned butterflies are identified by their distinct, prominent tails. Caterpillars have many predators, including birds and other insects. To protect themselves from becoming prey, they use various defense mechanisms. Some common defense mechanisms among caterpillars include:
- Markings and patterns, such as large eye spots, that intimidate predators.
- Warning colors that signal the caterpillar is toxic to eat.
- Camouflage, allowing the caterpillar to blend into its environment and resemble twigs, leaves, or bird droppings.
- Chemical defenses, such as venomous hairs, the release of chemical compounds, and the storage of toxins from plants in their bodies.

Caterpillars have many defenses to help them survive this vulnerable stage in their life cycle.
©Gerry Bishop/Shutterstock.com
How Does a Swallowtail’s Osmeterium Work?
If you have ever found a swallowtail caterpillar in your garden and gently tapped or handled it, you probably saw its yellow, forked gland appear. Perhaps you even smelled the pungent odor that the gland secretes. When a swallowtail larva feels threatened, its osmeterium emerges from the segment behind its head (the prothorax), where it normally remains hidden.

When threatened, a swallowtail caterpillar’s osmeterium will emerge from behind its head.
©Jay Ondreicka/Shutterstock.com
The caterpillar’s osmeterium consists of tubular arms that secrete chemical compounds. Even before the gland secretes anything, the bright orange or yellow color (depending on the species) of the forked gland serves as a warning to predators.
Scientists have found that the liquid released contains a mixture of foul-smelling, volatile organic compounds. The secretion was found to successfully deter some insects, including ants and praying mantids. However, it does not appear to work well against birds.
What Does It Smell Like?

Some swallowtail caterpillars use camouflage to protect themselves in addition to their other defenses.
©Dan4Earth/Shutterstock.com
According to Ask an Entomologist, the smell of the caterpillar’s substance can be subjective. People have reported citrus and parsley smells, while others have described it as an “unpleasant odor”. When looking at the chemical composition of the compound, scientists have found that it changes as the caterpillar ages. Therefore, the smell depends not only on the species and age of the caterpillar, but also on the observer’s subjective perception.