Black Swallowtail Caterpillars on Dill: Share the Plant, Let Them Wander

Black swallowtail caterpillars on dill need only enough carrot-family plants to finish growing and room to wander off to make a chrysalis. University of Wisconsin-Madison Extension says they are usually not numerous enough to be a real problem.

The disease the thread named is a parasite of monarchs and their close relatives, not of swallowtails, as the studies read describe it. And chrysalis color, which one extension page calls genetic, comes from genes and surroundings together.

The question comes from a thread on r/gardening. A gardener found a striped caterpillar on dill, learned online that it was a black swallowtail, and decided it could have all the dill it wanted.

Replies listed the herbs and weeds it eats and described orange horns and a smell when it is poked. They said caterpillars crawl far from the plant to pupate, and argued over netting the plant or raising them indoors against birds. One reply had stopped raising monarchs indoors because of a disease named only by its initials.

What This Article Covers

This article covers black swallowtail caterpillars in a herb garden: what they eat, the orange horns, where they go to pupate, why a chrysalis is green or brown, how long each stage lasts and whether the monarch parasite matters. Our articles on wild fennel by the road and parsley’s second year cover two of its food plants.

What They Eat

Susan Mahr’s Wisconsin Horticulture article on the black swallowtail, revised in November 2026, lists the caterpillars’ food plants as the carrot family. In gardens these are dill, parsley, fennel, celery, caraway and carrot, and sometimes common rue from the citrus family.

Mahr says the caterpillars can eat entire plants but are usually not numerous enough to present a real problem. For a gardener who does not want the herbs eaten, handpicking works in most cases, and the caterpillars can be moved to suitable food plants outside the garden.

The diet is chemistry as much as taste. These plants carry compounds called furanocoumarins, and Hung and colleagues describe enzymes in black swallowtail caterpillars that detoxify them, according to their abstract.

The females find the plants by smell. In free-flight tests with model plants, Heinz found that egg-laying females, even ones that had never met a food plant, approached and landed more on scent extracts of two food plants than of a plant they do not use, according to her abstract.

The Orange Horns

The horns are the osmeterium, a forked organ behind the head. Mahr says a disturbed caterpillar rears up and pushes it out for a short time, releasing a foul-smelling chemical that repels predators, and that it is harmless to people.

Its chemicals have been tested against ants. Working with components of the secretion from swallowtails in general, not this species alone, Honda found most of the acids and esters toxic to two ant species, and nearly all the compounds repelled worker ants in the field, according to his abstract.

Where They Go to Pupate

The replies that said the caterpillars leave the plant are right. Mahr says a grown caterpillar wanders away from the food plants and settles head-up on a plant stem, tree trunk or foundation wall, held by a silk band around its middle.

Field work agrees. Releasing caterpillars marked with paint that glows under ultraviolet light and finding them at night, West and Hazel found black swallowtails pupated off the ground on grasses, weed stalks, posts and other supports, according to their abstract.

Neither source gives a distance, and none read says how far from the plant a gardener should look.

Green or Brown

Mahr says a chrysalis is greenish with yellow markings or mottled brown, that this is set genetically rather than by the caterpillar’s surroundings, and that chrysalises that overwinter are always brown. The primary studies read describe it differently.

Chrysalis color is partly inherited, not wholly

Green and brown black swallowtail chrysalises before and after four generations of selection in a laboratory, to scale.

Black swallowtail chrysalis color under selection A to-scale chart. In one southern Florida black swallowtail population raised under short days, four generations of selection raised green chrysalises from 21.8 to 58.8 percent and cut chrysalises entering diapause from 88.6 to 20.6 percent. 0% 50% 100% Green chrysalises Before selection 21.8% After four generations 58.8% Chrysalises entering winter rest Before selection 88.6% After four generations 20.6% One southern Florida population, raised in a laboratory under short days, selected four generations against winter rest (diapause).

Selecting against winter rest also raised the share of green chrysalises, so color has an inherited part; a separate study found genes and surroundings act together, this species responding more to visual cues than a related swallowtail.

Sources: S. R. Sims, Entomologia Experimentalis et Applicata, 2007 (abstract); W. N. Hazel and D. A. West, Ecological Entomology, 1979 (abstract). Laboratory and field studies of other populations may differ.

Working with this species and a related swallowtail, Hazel and West concluded that green and brown chrysalises result from genotype and environment acting together, according to their abstract.

The main cues were texture and what the caterpillar saw, and the black swallowtail, which usually pupates on slender stems among plants, responded more strongly to the visual cues than the related species did.

An earlier greenhouse study by Smith found the black swallowtail also appears to be affected by background color, according to his abstract.

Genes play their part as well. In a southern Florida population raised under short days, Sims selected for four generations against winter rest, called diapause, which fell from 88.6 to 20.6 percent, and green chrysalises rose from 21.8 to 58.8 percent, according to his abstract.

Sims also found that short days did not make only brown, overwintering chrysalises in that population. So “always brown” may hold in some places and not in others.

How Long, and Indoors or Out

Mahr gives the timings for Wisconsin. Eggs hatch in 3 to 9 days, and the caterpillar stage takes 10 to 30 days depending on temperature and food plant.

First-brood chrysalises stay 2 to 3 weeks, longer than the thread’s 10 to 14 days, while later generations pass the winter as chrysalises and the adults come out in spring.

Outdoors, the caterpillars have their own defenses. Mahr says young ones are black and spiny with a white saddle that mimics bird droppings, older ones blend into the plant, and the caterpillars flick their droppings away from the plant so parasitic flies and wasps that hunt by smell are less likely to find them.

No study read tested netting a plant or raising black swallowtails indoors, so whether either improves their survival is not known from the evidence here. The rearing guidance in the sources read is written for monarchs.

The Disease the Thread Named

The initials belong to Ophryocystis elektroscirrha, or OE. McLaughlin and Myers described it from naturally infected monarchs and Florida queens, and found adults carry the spores on the outside of their scales, according to their abstract.

In Guerrero-Araujo and colleagues, OE is a specific parasite of the butterfly genus that includes monarchs and queens, though in experiments it can complete its cycle in other butterflies, according to their abstract.

Dargent and colleagues call it host-specific to monarchs. None of the sources read reports it in a swallowtail. The thread’s worry about indoor disease came from raising monarchs, and the evidence read does not carry it to swallowtails.

The Butterflies That Come Next

Mahr says there are usually two generations a year in the upper Midwest, with adults flying from mid-May to late September and most numerous from early July to late August, and a third flight in southern regions.

The adults feed on nectar from many flowers, among them milkweed, thistles, purple coneflower, zinnia and Verbena bonariensis, and visit damp ground for salts. Males emerge first and patrol territories for females.

The underside of the black swallowtail’s wings, Mahr writes, mimics the distasteful pipevine swallowtail, which can fool vertebrate predators into avoiding it.

For a garden that welcomes them, her advice is to plant nectar flowers through the season, especially spring and fall, alongside the food plants for caterpillars, and to avoid insecticides and other pesticides.

What Remains to Be Explored

No study read measured how many black swallowtail caterpillars survive on garden herbs, tested netting or indoor rearing, or gave a distance caterpillars travel before pupating. The chrysalis color studies are from laboratories and one field site each.

Whether OE or another disease spreads among swallowtails raised together indoors was not addressed by anything read, and neither was how many caterpillars a single dill plant can feed.

Sources

More in