Black swallowtail butterfly raised indoors spreading wings to be released

There is something magical about watching a butterfly emerge from its chrysalis—especially when you have helped it get there. Raising black swallowtail caterpillars indoors or in a netted enclosure is one of the simplest and most rewarding ways to experience nature up close. These butterflies are quite common across much of North America, and they will happily lay eggs on herbs you may already be growing, like parsley, dill, or fennel.

Whether you are hoping to protect your caterpillars from predators, teach your kids about the butterfly life cycle, or simply add a little wonder to your days, here is how to raise black swallowtail caterpillars inside—from egg to winged release.

Quick answer on how to raise black swallowtail caterpillars successfully: Black swallowtail caterpillars need fresh host plants like dill, fennel, or parsley, a breathable container with good airflow, daily removal of frass (droppings), and protection from extreme heat and predators. Most caterpillars pupate within 10–20 days, as long as healthy host plants are available.

But…Why Intervene with Nature?

Black swallowtails face many challenges outdoors—wasps, birds, and weather can all take a toll on their survival rate. Raising them in a netted enclosure gives them a better chance for them to make it to adulthood. By protecting them through the most vulnerable stages and releasing them as adults, you are helping sustain your local butterfly population.

It is also an enjoyable and educational process. Watching a caterpillar grow, spin silk, and transform invites you to slow down and reconnect with the natural rhythms that sometimes we are moving too fast to notice.

Ultimately, it is a personal decision, as caterpillars are also an important part of the food chain for other animals.

This guide will help you properly care for your caterpillars to give them a head start while preparing you for what to expect in each stage of caterpillar growth through pupation and emergence into an adult butterfly. The best part is, you do not need to be a scientist or have a large garden to help a few caterpillars—just have a little curiosity, care, and a few host plants you do not mind sacrificing to caterpillar munching.

Learning how to raise black swallowtail caterpillars indoors isn’t just fun; it’s a small act of conservation that helps increase native butterfly populations.

Before You Start, Choose the Right Host Plants

Black swallowtail caterpillars only eat plants in the carrot family (Apiaceae), and access to fresh, pesticide-free host plants makes the biggest difference in survival. In my experience, dill and fennel were eaten fastest, while parsley and cilantro became my back-up plant-heroes.

That is why I put together a full breakdown of the best host plants for black swallowtail caterpillars, including which ones grow best in Texas and which are easiest for beginners:

The Best Host Plants for Black Swallowtail Caterpillars

Black swallowtail egg and first instar caterpillars on host plant bronze fennel

A tiny egg on the host plant of Black swallowtail butterflies and a caterpillar (1st instar) below it.

1. Find the Eggs or Tiny Caterpillars

The journey starts in your garden. Black swallowtail butterflies often visit members of the carrot family—plants like parsley, fennel, dill, and golden alexanders. Check the leaves for tiny round yellowish eggs laid singly near the edges or tips. Within about a week, the eggs hatch into very small, black-and-white mottled caterpillars also with orange that are disguised to look like bird droppings.

If you cannot find eggs, do not worry, look for the caterpillars instead that are much easier to see. As they become older, they will change instars and turn green with black and yellow striping. Swallowtail caterpillars will molt through a total of 5 stages of development called instars before pupating into butterflies. Each instar lasts 2-7 days depending on temperature and food quality.

Need more host plants? For an easy step-by-step guide on How to Grow Bronze Fennel, a great perennial host plant for black swallowtail caterpillars, visit this link.

Black swallowtail caterpillars in their second instar showing characteristic black with white saddles coloring on bronze fennel flowers

Second instar black swallowtail caterpillars on bronze fennel flowers

Guide to Black Swallowtail Caterpillar Instars:

First Instar: 2-3mm, black and/or orange with whitish patch in middle of its body, eats edges of leaves, stays still for long periods

Second Instar: 5-6mm, black with white patch, similar look to first instar but with a spinier texture, feeding increases

Third Instar: ~3/8 inch, similar to second instar but larger

Fourth Instar: 1/2-3/4 inch, characteristic green and black bands appear, active eater, still rests in between feedings and before molting, growth really begins to pick up

Fifth Instar: 1.5-2 inches, bright green body with black bands and yellow to orange spots, devours whole leaves and stems, stops eating and wanders off to find a solid spot to attach itself and pupate when ready.

If necessary to move the delicate caterpillars, gently snip the stem of the sprig they are on, and put a few more stems of its host plant in water around it in a protected area so its feeding is not interrupted. Even better: use potted host plants that can be moved.

Black swallowtail caterpillar just molted to 4th instar stage, size comparison with pen

Black swallowtail caterpillar early in its 4th instar of development, pen tip for size comparison. It just molted and is consuming its previous skin.

2. Create a Simple Habitat

A screened enclosure is ideal— there are many available to purchase online. Keep it in a safe, well-ventilated space and provide fresh host plants daily. A mesh butterfly habitat or even a large plastic container with a mesh or screen lid works well.

Line the bottom with paper to catch frass (caterpillar droppings), and place a few stems of their host plant in a jar of water. Cover the opening of the jar with foil or plastic wrap and poke holes for the stems—this prevents caterpillars from falling in and drowning. Better yet, use a plastic container with a lid you can poke holes into. For my caterpillars, I used potted host plants that fit inside their mesh enclosure.

Keep your setup in a bright area, out of direct sun and drafts. Room temperature is perfect. Provide sturdy supports (like sticks) once they come close to pupation time on which to attach their chrysalis. Raising black swallowtail caterpillars indoors is surprisingly low maintenance once you have the right setup!

Black swallowtail caterpillar in its fifth instar getting ready to pupate on a stick in mesh enclosure

Fifth instar black swallowtail caterpillar will soon be ready to pupate

3. Feed and Clean Daily

Fresh food is everything. Replace the host plant stems every day or two so the leaves stay crisp and green. Black swallowtail caterpillars eat a lot once they reach their final stage, and their waste increases too—so change the paper lining as needed to keep things tidy.

Handle them as little as possible. If you need to move one, let it crawl onto a stem or leaf instead of touching it directly.

If a caterpillar stops eating and starts wandering around restlessly, it is likely getting ready to pupate. That is your cue to provide a stick, twig, or even a mesh side where it can safely attach itself.

4. Watch the Transformation

This is where the real magic happens. When the caterpillar is ready, it will form a chrysalis—a beautiful green or brown casing where metamorphosis takes place. The chrysalis actually forms under the caterpillars’ current skin (which is an exoskeleton) and the outer skin is shed to reveal it. First, it will hunch itself into a J shape and attach itself by two silk anchors, often on the side of your container or a stick. The chrysalis can be green or brown, both are only differences in camouflaging.

The chrysalis stage lasts about 10 to 20 days or more, depending on temperature. Black swallowtail butterflies like to emerge at different times, unlike some butterfly species that are more predictable. During this time, do not mist it or handle it. Just keep the environment stable and gently observe. The last generation of black swallowtail butterflies every year will overwinter as a chrysalis and emerge in the spring. If nothing has happened for over 22 days or more, it is likely not to happen until spring!

Watching the black swallowtail life cycle unfold right before your eyes is one of the most satisfying parts of raising butterflies indoors.

You may notice the chrysalis darkening right before the butterfly emerges. When that happens, get ready—your butterfly will likely appear within 24 hours.

green black swallowtail butterfly chrysalis attached to host plant stem
Brown chrysalis of black swallowtail butterfly

Green vs. brown chrysalises made by black swallowtail caterpillars

5. The Butterfly Emerges

When your butterfly finally breaks free, it will need time for its wings to dry. The wings will be soft at first, but in about 2 hours they will expand and harden. Leave the butterfly in its enclosure for a few hours after it emerges so it can strengthen its wings safely. You will notice it occasionally uncurling its proboscis (tongue) and testing its wings. Unless the weather is very unfavorable, release each butterfly within a day of emerging so it does not damage its wings on the mesh. My swallowtail butterflies this year all pupated in the morning around 8am were be ready to go before noon when it was warm and sunny outside.

6. Release Day

Releasing your butterfly is a moment to savor. Morning to early afternoon is ideal, when temperatures are mild and there is plenty of daylight. Take the enclosure outside first and allow the butterfly some time to acclimate. Open or unzip the door or lid and allow the butterfly leave on its own. Most of mine took off right away into the air; other times they may find a tree or another type cover to rest in.

Once you watch that flash of black and yellow lift into the sunlight, you will understand why so many people fall in love with raising butterflies—it is a reminder of renewal, resilience, and quiet beauty.

Black swallowtail butterfly after being raised indoors emerges from chrysalis

Emerged black swallowtail butterfly ready for release

7. Clean and Reset

After your release, clean your habitat with mild soap and water and let it air dry. You can reuse it for future generations of swallowtails. If you planted dill, parsley, or fennel outside, you will likely see new eggs appear before long—black swallowtails often return to the same plants year after year.

Extra tip: If you find chrysalises late in the season, they may overwinter instead of hatching. In that case, keep them somewhere cool and protected but still exposed to light cycles until spring.

A Real Black Swallowtail Caterpillar Timeline (From My Garden)

In my own garden, the black swallowtail caterpillars followed a fairly consistent pattern once they were established on their host plants.

Days 1–3: Eggs hatched into tiny caterpillars that stayed close to the original leaf, feeding a bit and resting most of the time.

Days 4–7: Growth began, with frequent feeding and noticeable size changes after each molt. Host plants were important, but not disappearing fast yet.

Days 8–11: Caterpillars became more active with frequent feeding and quickly growing noticeably larger, also producing a lot more frass and needing daily cleaning. Fresh and abundant host plants were critical, as a single caterpillar could devour multiple leaves in a single feeding.

Days 12–14: Caterpillars stopped eating, wandered the enclosure, and once they found their “spot”, hunched up and secured themselves with 2 tiny threads before pupating.

Common Questions/ Answers

Do black swallowtail caterpillars need water?

No—they get all the moisture they need from the fresh leaves. Just replace wilted host plants daily.

Why did my black swallowtail caterpillar stop eating?

It is normal for black swallowtail caterpillars to stop eating shortly before pupation. At this stage, they often wander the enclosure looking for a place to attach themselves. If a caterpillar stops eating earlier than expected, overheating, lack of fresh host plants, or stress from overcrowding may be the cause.

What should I do if a caterpillar looks still or dark before pupating?

That is normal. They often rest motionless for several hours before forming the chrysalis and their skin becomes dull before they shed it.

How long does it take for black swallowtail caterpillars to emerge from their chrysalis?

Most black swallowtail caterpillars emerge (or eclose) within 10–20 days after pupation, depending on temperature and food quality. In warmer conditions with plenty of fresh host plants, development is usually faster. Cooler temperatures or overcrowding can slow the process. If it is later in the season, it may overwinter as a chrysalis, in which case it will rely and daylight cues and emerge in the spring.

Can I keep the butterfly?

It is always best to release it. The goal of raising butterflies indoors is to strengthen your local population.

Releasing black swallowtail butterfly into wild after raising indoors

Releasing a male black swallowtail butterfly back into the wild

The Joy of Letting Go

Each time you release a swallowtail, you are not just sending a butterfly into the world—you are sending out a reminder that small efforts matter. In a time when pollinators are declining, even one successful release helps balance the scales.

And perhaps most importantly, it reconnects you with wonder—the quiet kind that blooms when you take time to notice the hidden life around you.

If you are planning or planting this season, the Butterfly Garden Cheat Sheet can help you check that the basic habitat pieces are in place.

Leave a comment