Summarize this article:

Containers for caterpillars can be found in hobby and pet shops, on the Internet, or you can fashion one from items around the home. Preferably this should be one made from wire mesh, to give the caterpillar something to cling to. An aquarium or a one-gallon jar can work, too, provided it's lined with a screen or cheesecloth tightened with a rubber band at the top. Don't use jar lids with holes in them, however, as these don't provide adequate ventilation and can also cut the delicate caterpillars with sharp edges around the holes. Put a two inch layer of dirt and grass on the bottom of every container if you think your caterpillar may pupate below ground. If not, a layer of paper towels or newspaper will do fine. Instead of spraying or squishing the caterpillar, identify it (see Warnings) and capture it to grow into a butterfly. Butterfly season is from late spring to summer, depending on your region. If you don't know of a spot that caterpillars like to frequent, consult a local field guide to determine which plants are preferred "host" plants for butterflies, like the Peterson First Guide to Caterpillars, Caterpillars of Eastern Forests, or on the Internet. Make sure you're not capturing an endangered species, which could be illegal. Different types of butterflies prefer different hosts. Some common host plants include: Milkweed - Monarch Butterfly Spice bush - Spice bush Swallowtail Paw-Paw - Tiger Swallowtail Thistle - Painted Lady Parsley, dill and fennel - Black Swallowtail Cherry - Cecropia Moth, Viceroy, Red-Spotted Purple If it's not caterpillar season, or you simply don't have time to go caterpillar searching, consider buying them from a caterpillar supplier. We'll discuss that in the last section.
Prepare a well-ventilated container. Look out for caterpillars on your plants.