Create a backyard butterfly habitat, and learn how to raise Swallowtail Caterpillars!

The purpose of this activity is to encourage Black Swallowtail Butterflies to visit your backyard by designing a butterfly habitat specific to their needs. You will learn which plants attract Black Swallowtail caterpillars and butterflies so they can enjoy a healthy snack fresh from your own garden. Then, you can easily observe the life cycle stages of the butterflies as they enjoy all the comforts of home in the butterfly habit YOU designed.  Activity Created by Nancy Yard, RHA Volunteer and Educator

Start plants from seeds, or use plants readily available to create a butterfly garden area, by either using containers or a small plot in your backyard.

Thanks to students, gardeners, and NABA (the North Jersey Butterfly Club) the Black Swallowtail is now the New Jersey official state butterfly.

Duration: Spring through early fall.

Level: Pre K through Middle School, Families

Setting: This lesson takes place in a “garden” you will design. You can be very creative in its design and placement. The plants will adapt well to a variety of pots/containers. Full sun is the necessary component to growing strong plants and attracting butterflies.


  • Seeds: Parsley or Dill, Carrots, Zinnias, Cosmos (you can also purchase plants, which are readily available in garden centers)
    • Food sources (or host plants) for Black Swallowtail larva or caterpillars: parsley, dill and carrot tops (Other larva food sources include Queen Anne’s Lace, Fennel and Turnips.)
    • Nectar Sources for Black Swallowtail Butterflies: Zinnias and Cosmos (Other nectar sources for adult butterflies include: Bee Balm, Lantana and Coneflowers.)
  • Growing Mixture:  Potting soil mix for edible crops or garden soil (Organic soil if possible.)
  • Containers for gardening and seed sowing: recycled containers such as milk cartons, egg cartons, yogurt containers, a variety of large pots or a small garden plot


Did you ever wonder what carrots, butterflies and kids all have in common? How you can help improve the habitat for our state butterfly while eating healthy yummy snacks? Enjoy gardening while exploring these questions!                                                             

1. Design Your Garden

  • Select an area that gets 6 to 8 hours of full sun
  • Select a garden spot that is approximately 4 feet by 4 feet, 4 feet by six feet, or gather three to four large containers.
  • Sketch your garden by including both:
    • (A) Nectar Plants like zinnias, cosmos
    •  (B) Larva or Host Plants like parsley, carrots
  • Example Design: in ground garden or raised bed, alternating host and nectar plants

  • Containers should be large enough to accommodate healthy roots. Plants can be clustered in large containers such as barrels, buckets or bins.
    • Container sizes:
      • Carrots:  12 to 18 inches deep
      • Parsley: 6 to 12 inches deep
      • Tall Zinnias: 12 to 18 inches deep
      • Small Zinnias: 8 to 12 inches deep

Example 1: Container Garden

  1. 4 pots of Zinnias
  2. 1 Large pot of Parsley containing three to four plants
  3. 1 large pot of carrots

Example 2: Container Garden

  1. 2 cosmos
  2. 2 zinnias
  3. 6 parsley plants

Example 3: Mixed In-Ground and Container Garden

  1. Row of carrots/parsley in ground
  2. 6 pots of zinnias


2. Seed Sowing, Indoors and Out

Zinnia and Cosmos

Starting Indoors:

Seeds can be started indoors four weeks before your last danger of frost. (You can find your frost date on the internet by using your zip code, however a good rule of thumb for New Jersey is May 15th .)

Sow seeds ¼ inch deep and cover lightly. Water lightly every other day.

Starting Outdoors:

Seeds can be started outdoors after all danger of frost. Plant seeds in rows or scatter being sure to remove/thin or relocate plants until they are  to 8 to 12 inches apart depending on variety selected.







Parsley and Dill

Starting Indoors:

Plant seeds inside in individual pots six to eight weeks before final frost. Plant ¼ inch deep, cover lightly and water every other day. Thin to two three plants per pot.

*Parsley and/or Dill, Staring Outdoors:


Plant seeds directly in a the ground or pot after final frost. Plant in rows or scatter. Plant a ¼ inch deep.


Starting Outdoors:

Carrot seeds should be planted in the ground or in a large pots after all danger of frost. Plant in rows or scattered. Plant seeds ¼ inch deep. Cover lightly with soil. Water lightly every other day.  Remove/thin plants when they are two inches tall to two inches apart.







Hardening Off Young Plants:

Seedlings (or young plants) should be moved outside to a sheltered location after all danger of frost. This allows them to adapt to wind, full sun and rain. This is known as hardening off and should last about five days to one week. Depending on sheltering conditions it is beneficial to move them outside a few hours each day and bring them back in at night. Be sure to make certain plants don’t dry out as plants adapt to the outside conditions.


No need to worry if you are late getting your plants started. Butterflies and caterpillars become more abundant throughout the summer months. Why? How does their life cycle contribute to this increase?


3. Maintaining Your Garden

  • Watering is best done early in the day. Water the soil thoroughly every few days. Pots may require more frequent watering.
  • Mulch will help maintain moisture and help prevent weeds.
  • Zinnias and Cosmos require the removal of faded flowers to encourage more blooms to attract butterflies. This is often referred to as deadheading. Deadheading can be done by pinching blooms just below the flower head or using a pair of scissors.

  • Carrots are ready to harvest when the carrot top is visible and approximately 1/2 inch in round.  Gently push away the soil to view your carrot tops.


4. Observing the Life Cycle of the Black Swallowtail Butterfly

Egg Stage: Black Swallowtail eggs are small and yellow. They are laid individually under the leaf of the larva/caterpillar food source.  Eggs develop in 3-5 days. If you look carefully under the leaves of your Host Plants you can see them against the green foliage.

Caterpillar/Larva Stage: The caterpillars develop into full size in approximately 10-14 days. Their appearance changes as the caterpillar grows. Look for partially eaten leaves.

Young Caterpillar

Older Caterpillar



The caterpillar will often move away from its food source when it is ready to become a pupa/chrysalis (stage where caterpillars chanes to adult), look for caterpillars on surrounding plants or objects.

Pupa/Chrysalis Stage: This is when the butterflies transform from the larva stage to the adult butterfly. The caterpillar attaches itself by a thread and develops in a pupa. It can be difficult to spot the pupa as when it is complete it is small and brown and blends in with the surroundings.

Butterfly Stage: Pupas formed in summer will emerge as adults, or butterflies in 10-14 days. Pupas formed in late summer, as the weather cools and the days get shorter, may over winter, or spend the winter as pupas. The butterflies will emerge in the following spring as the weather warms and nectar plants become available.


5. Rearing Black Swallowtail Butterflies

If you find an egg on your plants, you can raise the Black Swallowtail Butterflies by using a temporary holding container. This is a commitment to a living thing and must be carefully maintained and monitored.

  • Select an insect rearing tank or small fish tank.









Place the larva’s food source, or host plant, in the bottom of the tank. (This will be the plant your larva is feeding on when you discover it in your garden.) Wrap the end of the stem or leaf with a moist paper towel to help maintain freshness.

Be sure to select healthy leaves that are green and pest free. Change the food source as it is eaten and remove any frass, or caterpillar droppings, from the container.




  • Secure/prop a stick in the tank. This will support your caterpillar as it molts, or sheds its outer skin to change into a pupa, and will also support the emerging adult butterfly later.

The stick should reach the top of the container to ensure that the butterfly can fully emerge and extend its wings. The caterpillar will often make its pupa on the top of the tank so the top must be secure to hold the emerging adult






  • Cover and secure the top of the tank with a screen or other netting. Black Swallowtails are great at escaping so make certain there are not gaps or holes.
  • Place the tank out of direct sunlight.
  • Find a large Black Swallowtail Caterpillar to place in the tank. Monitor the food daily and replace to ensure freshness.
  • Once it becomes a pupa monitor for signs of emerging.

Note: If you collect your caterpillar late in the summer or early fall it will go into diapause or rest until the following spring. Your pupa continues this stage and spends the winter as a pupa, or “over winter.”  Place the caged pupa in an area where it is cool and sheltered, such as a storage shed, barn or unheated garage. In dry conditions light misting is recommended every few weeks throughout the winter. Mist the container lightly. Begin checking for your emerging butterfly in April. Bring the cage out in the spring when the weather warms.

  • When your butterfly emerges, set the cage in a sunny location and remove the lid. When its wings are warm and dry your butterfly will take flight!


6. Wrapping Up:

  • What might happen if you placed several caterpillars in your habitat container to develop into butterflies?
  • Why would there be more butterflies/caterpillars visible in your “garden” in August than in June?
  • Why is it beneficial to the Black Swallowtail to have some butterflies emerge in the warm days of summer and some the following spring?

More information:


How did you like this activity? Please share any questions, comments, or photos that you and your child have on the Raritan Headwaters Learning Community Facebook Page!

More Raritan Headwaters Learning Resources