How to Raise Black Swallowtail Butterflies in a Container Garden
A few feet from our back door, a green chrysalis went dark and translucent one morning, split open, and a female black swallowtail pulled herself free. She was one of 22 caterpillars we raised this round, all of them fattened up on dill we grew just for them. Here is how the full process works, and how to set it up in your own container garden.

We grow all of this in our North Texas container garden with no sprays of any kind, and we share the whole process over on Mandi's page, @mrsmandivaughn. All images in this blog are property of Mandi Vaughn & On The Grow, llc. This post contains affiliate links, and we only link to things we actually use. See our full affiliate disclosure for details.
Quick Answer: How to Raise Black Swallowtail Butterflies
Raising black swallowtails at home comes down to giving them the right plants and leaving the space unsprayed.
- Grow their host plants. Black swallowtails lay only on the carrot and parsley family: dill, fennel, parsley, and carrot tops. Plant extra so there is enough to share.
- Add nectar flowers. Adults feed on nectar, and flowers like zinnias give them a place to feed and a safe spot to dry their wings.
- Let the females find it. A female tastes plants with her feet, then lays eggs one at a time, up to around 400 over her short adult life.
- Feed the caterpillars. The caterpillar is the only stage that eats solid food, so it needs plenty of leaves to grow through its color stages.
- Protect the chrysalis. When a caterpillar is done eating, it wanders off to a safe spot and forms a chrysalis, green or brown, both normal.
- Watch it emerge. After roughly 9 to 18 days in summer, the adult emerges, pumps up its wings, and dries off before its first flight.
In the wild, only about 1% of eggs reach adulthood. Raising them under cover can push that far higher, so a single well-planted pot of dill can produce dozens of butterflies over a season.
Meet the Black Swallowtail
The eastern black swallowtail (Papilio polyxenes) is one of the most common and rewarding butterflies to raise in a backyard garden. The adults are mostly black with rows of yellow spots and blue scaling, plus a small orange-red eyespot with a black center on each hindwing.
To be sure you have a black swallowtail and not a lookalike, check the eyespot. On a black swallowtail, the black center of that eyespot sits in the middle, and the underside of the hindwing carries two rows of orange spots. That centered eyespot and the yellow banding help separate it from the all-dark Pipevine swallowtail it mimics, along with the Spicebush swallowtail. The Texas A&M field guide to common Texas insects is a good regional reference if you want to compare markings.

Why We Grow Dill Just for Them
Attracting and raising black swallowtails comes down to two kinds of plants. The adults need nectar sources like zinnias, and the caterpillars need a host plant to grow on. Black swallowtails lay their eggs only on the carrot and parsley family (Apiaceae): dill, fennel, parsley, and carrot tops. Ours go for dill first.
These plants contain natural compounds called furanocoumarins that deter or poison most insects. Black swallowtail caterpillars evolved detox enzymes that break those toxins down, which lets them feed on a plant most other bugs avoid. Claiming a food source with little competition is a large part of how they survive.
Last year we did not grow nearly enough dill. This year we seeded a 25-gallon planter heavily, almost like a tray of microgreens, so there would be plenty to go around. If you already grow microgreens, this will feel familiar, and the same seed-starting supplies work well for getting herb starts going.
We grow pretty much everything in 25-gallon containers from Tractor Supply, and that is where our dill is right now. A container that size gives the plant plenty of root room and holds enough dill to feed a full batch of caterpillars. Fabric grow bags are another great option, especially for starting plants, and we get into why we use fabric grow bags for our backyard garden. You can find our go-to bags and feeding options on our garden fertilizers and fabric grow bags list. For dill, fennel, and parsley seed, we use True Leaf Market, which carries garden seed alongside microgreen seed.

The Black Swallowtail Life Cycle, Stage by Stage
The journey from egg to butterfly runs through four stages. Here is what each one looks like in our garden.
1. The Egg
A female searches for the right host plant, drums her front legs on the leaves to taste and confirm the species, then curls her abdomen under and places eggs one at a time. She does not lay in clusters. Over a two to four week adult life she can lay up to around 400 eggs, roughly 30 to 50 a day. You can watch a female laying on our dill in this reel.
The eggs are tiny, round, and pale, and they darken just before hatching. In the wild only about 1 in 100 will survive to become an adult, which is why a little protection from you changes the odds so much. The University of Wisconsin horticulture extension has a clear breakdown of the stages if you want to go deeper.

2. The Caterpillar
The caterpillar is the only stage that eats solid food. The adult butterfly only sips nectar and cannot grow, so all of the growth, thousands of times its starting size, happens during the caterpillar stage.
Caterpillars change dramatically as they grow through stages called instars. Early on they are tiny, dark, and shiny with a white saddle, mimicking a fresh bird dropping so birds pass them by. Once they get too fat to pass as droppings, they molt into the bold green, black, and yellow striped look that blends into sun-dappled leaves.
The caterpillar's simple "eyes" are not true eyes. They are tiny light-sensing organs called stemmata that detect light and movement but form no sharp image, and the bold "face" many people notice is just banding on the head. The chubby legs down the body are prolegs, false legs with rows of tiny hooks that grip the dill. Only the six true legs up front carry into adulthood.
For defense, a threatened caterpillar everts a bright orange forked organ called an osmeterium. It gives off a rotten-citrus smell that tells birds and wasps to back off, and it is harmless to us. You can see one in this reel.



3. The Chrysalis
When a caterpillar has eaten its fill, it empties its gut, crawls off the dill, and goes looking for a safe place to transform. This is why caterpillars seem to vanish overnight. They were not eaten. They left to pupate.
They can wander well away from their host plant to find a spot they like, and they often attach to a stem or twig close to the ground. Our emerging female formed her chrysalis on a milkweed stem. She never ate the milkweed, she only used it as a sturdy perch, which is a good reminder that where a caterpillar pupates and what it eats are two different things.
Black swallowtail chrysalises range from green to brown. The color tracks the surroundings as camouflage, and it is not a sign of the butterfly's sex or its health. In summer, a chrysalis usually opens in about 9 to 18 days. When it darkens and turns translucent, emergence is close.

4. Emergence
The correct term here is emerge. Butterflies emerge from a chrysalis, eggs hatch, and moths, not butterflies, spin a cocoon. Black swallowtails form a chrysalis and emerge from it.
The morning our female came out, she emerged at 7:47 and the whole process ran about 10 minutes. Right out of the chrysalis her wings were soft and crumpled. She pumped a fluid called hemolymph through the wing veins to expand them, and a small reddish drop appeared, which is meconium, leftover pupal waste that is completely normal.
After that, a fresh butterfly needs an hour or more to hang and harden before its first flight. We move newly emerged butterflies onto our zinnias to dry, since Texas grass is full of spiders and most bugs leave the zinnias alone with so many other flowers around.

Male or Female? How to Tell Them Apart
Black swallowtails are sexually dimorphic, which means the males and females look different. Once you know the tell, it is easy to call.
- Males show a bold, bright yellow band across the wings, with only a little blue.
- Females have smaller, paler yellow spots and a wide, powdery blue band the males lack.
So lots of vivid blue means a female. Our emerging butterfly showed that blue band clearly. You can see a side-by-side in this reel.
The chrysalis color does not tell you the sex. Green versus brown is camouflage, nothing more. You only know male or female once the wings are out.

Why the Garden Layout Helps Them Survive
In the wild, only about 1% of black swallowtail eggs survive to adulthood. Plenty of people raise the caterpillars indoors or under netting to improve those odds, but we do not add any protection at all.
What works for us is the layout. We grow in 24 separate containers, grouped and spaced across the yard, with the dill in its own pot. From what we have seen, the predator bugs stay so busy working the showier plants, the vitex and the sunflowers especially, that they rarely bother the dill. The caterpillars get left alone without us doing a thing.
We also skip netting on purpose. With how much rain we get here lately, we would feel terrible about a caterpillar getting stuck in wet netting inside a container. Leaving them in the open on a host plant the predators tend to overlook has worked better for us than trying to cage them.
Small gains in survival add up fast, since a single female lays up to around 400 eggs. Give them a dedicated pot of dill in a busy garden, and you can end up with far more butterflies than the wild odds would suggest.
We do have a dream that one day, once we are out of an HOA neighborhood, we will have an actual butterfly hatching space like the ones you see at butterfly gardens, protected much like a greenhouse.
Our No-Spray Container Garden Approach
None of this works if you spray. We never use pesticides or herbicides anywhere in our garden, and the containers keep it effectively no-till. That is the whole point. A no-spray garden is what lets ladybugs, lacewings, spiders, and predatory wasps show up and handle the pests, so we can raise caterpillars right alongside them.
More blooms bring more bugs, and more bugs bring the predators that keep everything in balance. Sprays would wipe out the caterpillars and the beneficial insects along with the pests, so we leave the garden to sort itself out. For the bigger picture on building this kind of habitat in our region, we go deeper in pollinator-friendly gardens for North Texas.

What You Need to Get Started
You do not need much to start raising black swallowtails at home.
- Host plants: dill, fennel, parsley, or carrot tops. Grow more than you think you need. Seed from True Leaf Market.
- A roomy container: a big planter or fabric grow bag, like the ones on our garden fertilizers and fabric grow bags list.
- Nectar flowers nearby: zinnias are our favorite, both as a nectar stop and a safe place for fresh butterflies to dry their wings.
- A no-spray mindset: skip the pesticides and let the predators do the work.
- Patience and a camera: the rest is watching it happen.
If you are new to growing from seed, our herb and microgreen backgrounds overlap a lot, and even a few empty planting pots can get you started. Follow the day-to-day over on @mrsmandivaughn, and browse the rest of our Garden and Pollinator Blog for more.
Frequently Asked Questions
Do black swallowtail caterpillars eat milkweed?
No. Black swallowtails eat the carrot and parsley family: dill, fennel, parsley, and carrot tops. Milkweed is the monarch's host plant. A black swallowtail caterpillar might climb a milkweed stem to form its chrysalis, like ours did, but it will not eat it.
How long does the black swallowtail chrysalis stage last?
In summer, a black swallowtail usually emerges about 9 to 18 days after forming its chrysalis. When the chrysalis darkens and turns translucent, emergence is close, often within a day. A late-season chrysalis can overwinter and emerge the following spring.
How can you tell a male black swallowtail from a female?
Look at the band across the wings. Males have a bold, bright yellow band, while females have smaller yellow spots and a wide, powdery blue band. Lots of vivid blue means a female. The chrysalis color does not indicate sex.
Why did my caterpillars disappear overnight?
Usually because they left to pupate, not because something ate them. Once a caterpillar finishes eating, it wanders off the host plant to find a safe, sheltered spot to form its chrysalis, sometimes several feet away on a different plant or structure.
What is the orange thing that pops out of the caterpillar?
That is the osmeterium, a forked defense organ the caterpillar everts when it feels threatened. It gives off a rotten-citrus smell that wards off birds and wasps. It is harmless to humans and tucks back in once the caterpillar feels safe.
Will black swallowtail caterpillars eat the butterfly eggs?
Not on purpose. Right after hatching, a caterpillar eats its own eggshell for the nutrients, but black swallowtails are not egg hunters the way a few other species are. Because they feed almost constantly, a large caterpillar can accidentally eat an egg or a tiny hatchling sitting on the same frond it is chewing. If you are collecting eggs to raise, give them their own container or a separate sprig so a hungry caterpillar does not run them over.
What are the host plants and nectar plants for black swallowtails?
Two different sets of plants do two different jobs. Host plants feed the caterpillars. Most are in the carrot and parsley family: dill, fennel (including bronze fennel), parsley, carrot tops, celery, and cilantro, plus wild relatives like Queen Anne's lace. Rue is the common exception, a favorite host that comes from the citrus family instead. Nectar plants feed the adult butterflies. Zinnias are our favorite and the ones we move fresh butterflies onto, and black swallowtails also visit flat, clustered blooms like coneflower, phlox, gaillardia, lantana, and verbena. Plant some of both and you cover the whole life cycle in one garden.
Why should you not handle the caterpillars too much?
It is best to look more than you touch. Caterpillars are delicate, and their prolegs grip so tightly that pulling one off a stem can tear its feet or injure it. Handling also stresses them, which is what makes them pop out the osmeterium, and it is especially risky right before a molt or when they are getting ready to pupate. Human hands also carry oils and bacteria that can spread disease through a group, so the safer move is to shift the leaf or stem the caterpillar is on rather than the caterpillar itself, and to wash your hands if you do need to help one.
Final Thoughts
Raising black swallowtails is one of the most rewarding things we do in the garden, and it starts with a single pot of dill. Grow a little extra, add some zinnias for the adults, skip the sprays, and let the females find it. Before long you will have caterpillars a few feet from your door and butterflies drying their wings on your flowers.
Related Blogs
- How Does a Black Swallowtail Caterpillar Know to Eat Dill?
- Pollinator-Friendly Gardens in Hunt County: Native Plants and Herbs for North Texas
- Fabric Grow Bags: Why We Use Them for Our Backyard Garden
- Have a Few Empty Planting Pots Laying Around? Grow Microgreens in Them
- How to Grow Your Own Food Indoors with Microgreens
- How to Grow Cilantro Microgreens
- Worried About Brood XIX and XIII Cicadas Eating Your Garden?
- The Great Pill Bug Invasion of North Texas
- Top 5 Gardening Trends to Watch: What's Growing This Year
All content and photography by Mandi Vaughn, from our own first-hand experience raising black swallowtails in our North Texas container garden. Follow along at @mrsmandivaughn, and find her insect art and merch at mandimadeit.com.
This post contains affiliate links. We may earn a small commission on qualifying purchases at no extra cost to you. We only link to products we use and recommend.
Everything here comes from our own hands-on experience in our North Texas container garden. Timing, survival rates, and behavior can vary with your climate, host plants, and local predators, so treat our numbers as a starting point and watch what happens in your own space.
— On The Grow®, LLC
Happy growing!