Stick insects, despite their imposing appearance, are herbivorous. There are over 3,000 different kinds of stick insects, collectively called phasmids, and all of them eat plants. Some are very specialized, feeding only upon a favored plant species. Others are generalists.
The primary plant parts which phasmids feed upon are leaves. Their distinct twig-like appearance is an adaptation for traveling along larger branches and feeding upon leaves on the ends of twigs without being detected by predators. Phasmids occasionally also eat berries and fruit. The Indian stick insect, which is sometimes kept as a pet, is given complete branches from several plant species, including the blackberry and raspberry, to feed upon in captivity, Other plants given to captive phasmids include rose, ivy, hawthorn, oak and privet. In the wild, western short-horned walking sticks from the southwestern United States feed primarily upon globe marrow. They also feed upon borroweed and deerweed, but they are not the generalists that Indian walking sticks are. The giant walking stick of Texas is also quite specialized. It only lives in river bottoms and feeds upon oaks and grapevines. A Filipino species is known to eat only mango foliage, with a close relative eating only pili tree foliage.