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.
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.
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
- I Am Freaking Out!! — multiple community members. Reddit, r/gardening. Undated.
- Black Swallowtail, Papilio polyxenes — Susan Mahr. University of Wisconsin-Madison Extension. November 2026.
- Environmental Control of Pupal Colour in Swallowtail Butterflies (Lepidoptera: Papilioninae): Battus philenor (L.) and Papilio polyxenes Fabr. — Hazel Wade N., West David A. Ecological Entomology. November 1979. Cited from its abstract.
- Natural Pupation Sites of Swallowtail Butterflies (Lepidoptera: Papilioninae): Papilio polyxenes Fabr., P. glaucus L. and Battus philenor (L.) — West David A., Hazel Wade N. Ecological Entomology. November 1979. Cited from its abstract.
- Environmental Factors Influencing Pupal Colour Determination in Lepidoptera I. Experiments With Papilio Polytes, Papilio demoleus and Papilio polyxenes — Smith A. G. Proceedings of the Royal Society of London. Series B. February 23, 1978. Cited from its abstract.
- Diapause Dynamics, Seasonal Phenology, and Pupal Color Dimorphism of Papilio polyxenes in Southern Florida, USA — Sims Steven R. Entomologia Experimentalis et Applicata. April 20, 2007. Cited from its abstract.
- Defensive Potential of Components of the Larval Osmeterial Secretion of Papilionid Butterflies Against Ants — Honda Keiichi. Physiological Entomology. June 1983. Cited from its abstract.
- Host Plant Odor Extracts With Strong Effects on Oviposition Behavior in Papilio polyxenes — Heinz Cheryl A. Entomologia Experimentalis et Applicata. July 11, 2008. Cited from its abstract.
- CYP6B3: A Second Furanocoumarin-Inducible Cytochrome P450 Expressed in Papilio polyxenes — Hung Chien-Fu, Harrison T. L., Berenbaum M. R., Schuler M. A. Insect Molecular Biology. August 1995. Cited from its abstract.
- Ophryocystis elektroscirrha sp. n., a Neogregarine Pathogen of the Monarch Butterfly Danaus plexippus (L.) and the Florida Queen Butterfly D. gilippus Berenice Cramer — McLaughlin R. E., Myers Judith. The Journal of Protozoology. May 1970. Cited from its abstract.
- First Report of Ophryocystis elektroscirrha Parasitizing Danaus gilippus in Central Mexico — Guerrero-Araujo Jennifer Natali, Hurtado-Santiago Eliut, Cambrón-Sandoval Víctor Hugo, García-Rubio Oscar Ricardo. Southwestern Entomologist. June 29, 2021. Cited from its abstract.
- Low Prevalence of the Parasite Ophryocystis elektroscirrha at the Range Edge of the Eastern North American Monarch Butterfly Migration — Dargent Felipe, Gilmour Sydney M., Brown Emma A., Kassen Rees. Canadian Journal of Zoology. May 2021. Cited from its abstract.



