This is Article 2 in a 3-part series on pest control through companion planting. See Article 1, How to Attract Ladybugs to Your Garden, and Article 3, How to Stop Squash Vine Borers Before They Start. For the full companion planting system, visit Brian Lowell's Companion Planting class at the School of Traditional Skills.
Meet Your Garden's Sneakiest Thief
Unlike aphids, which show up gradually and give you time to react, hornworms operate like they are part of a heist. One day, your tomato plant looks completely normal. A few days later, whole branches are stripped bare, and there, camouflaged almost perfectly against the stem, sits a caterpillar the length of your finger, looking entirely unbothered by what it just did.
Brian Lowell, the instructor for our Companion Planting class, has spent years refining a system that stops hornworms before they get that far. It relies on scent, timing, and a small number of very specific plants. Once you understand why it works, tomato hornworms stop stealing your tomato plants, because you prepared for them last spring.
Why Tomato Hornworms Are Hard to Stop After They Start
A good heist depends on not being seen, and hornworms are built for exactly that. Their green bodies and pale diagonal stripes mimic the ridges of a tomato stem closely enough that gardeners usually spot the damage first, including stripped leaves, chewed stems, and missing fruit, long before they spot the worm responsible for it.
By the time that damage is visible, the worm has usually been feeding for a while, and hand-picking it off doesn't undo the defoliation already done. That's why Brian's approach skips the reactive fight altogether. The five-spotted hawk moth locates tomato plants primarily by scent, which means the most effective defense is a companion that masks that scent before the moth ever lands.

Basil: The First Line of Defense
That companion is Basil, and the mechanism is refreshingly simple. As the hawk moth hunts by smell, a strong-scented plant like basil interferes with that search, and instead of landing and laying eggs, the moth moves on to look elsewhere. Basil doesn't catch the thief; it keeps the tomato from ever getting cased in the first place.
Brian recommends planting basil on the south side of your tomatoes, where it gets full sun and isn't shaded out by the taller plants. Container gardeners don't need to share soil for this to work either. A pot of basil placed nearby does the job just as well.
Dill: A Trap Crop and a Predator Magnet
If Basil is what keeps the moth from scouting the place, dill is what's waiting if one gets in anyway, and it works two jobs at once. Planted near your tomatoes, it draws hornworms toward itself and away from the plants you're actually trying to protect.
At the same time, dill's flowers attract parasitic wasps, tiny insects that lay their eggs directly inside hornworm larvae. When those eggs hatch, the wasp larvae consume the hornworm from the inside out, which takes care of the worms that do wander toward the dill instead of your tomatoes.
Timing matters just as much as placement. Plant dill at the same time as your tomatoes so it's blooming when hornworms would typically arrive. If pests show up before your dill has flowered, next year plant it a week or two earlier, and keep notes on what you see.

Inviting the Beneficial Insects That Do the Work
Dill's parasitic wasps are the headline predator for hornworms, but a handful of other insects are worth attracting into a tomato bed. Each one has its own job and its own preferred plants.
Hoverflies. Easy to mistake for small wasps but harmless, and useful in two directions at once: as adults they help with pollination, and as larvae they are voracious predators of soft-bodied pests, hornworms included. A single female can lay up to 100 eggs in her lifetime, provided there's enough pollen and nectar around to support her. Dill, fennel, sweet alyssum, and cosmos will bring them in.
Damsel bugs. Similar in behavior to assassin bugs, but working smaller prey: aphids, mites, and small caterpillars. They need low, dense shelter to establish themselves, so bush beans, oregano, and thyme give them somewhere to live near the action.
Spiders. Not insects, but firmly on your side. Spiders are generalist predators that take a share of whatever pest pressure shows up in a garden. Varied plant heights and textures give them the structure they need to build webs and find shelter.
CTA: Brian's full beneficial insect profiles, with every predator, every plant that attracts it, and the complete trap crop table, are covered in his Companion Planting class.
Companion Planting
Discover how to use companion planting to create an ecosystem in your garden that will allow you as the gardener to take a back seat!
A Note on Timing
If there's one thread running through everything above, it's timing. And Brian’s general advice is to plant your companion plants at the same time you plant your crops.
That advice sounds almost too simple, but it's the difference between a companion plant that's pulling its weight when pests arrive and one that's still a seedling with nothing to offer.
And take good notes. Remember, if hornworms beat your dill to the bloom this year, adjust the calendar next season and write down when you first spot damage. That note becomes more valuable every year you keep it.
Frequently Asked Questions About Tomato Hornworms
Basil is the strongest scent-masking companion for tomatoes. The hawk moth that lays hornworm eggs locates tomatoes by smell, and basil confuses that search enough to send it elsewhere. Dill plays a second role, acting as a trap crop for hornworms while also drawing in the parasitic wasps that lay eggs inside their larvae.
Prevention through companion planting is the most effective approach: basil to deter the moth, dill to trap hornworms and attract parasitic wasps. If hornworms are already present, hand-picking works fine for a small population. For a larger infestation, focus on building the beneficial insect ecosystem so predators can catch up.
No. The parasitic wasps that target hornworms are tiny, often less than half an inch, and have no interest in stinging humans or pets. They need pollen and nectar to survive and reproduce, so flowering plants like dill, cosmos, and sweet alyssum both attract them and keep them around.
Plant companions at the same time you plant your tomatoes, so they're blooming when pest pressure typically arrives in your area. If hornworms beat the bloom in year one, plant companions a week or two earlier next season. Note-taking is how you get this right over time.
Yes. Dill acts as a trap crop that draws hornworms away from the main plant, and its flowers attract the parasitic wasps that parasitize hornworm larvae. Let dill go to flower for the most benefit, and plant it at the same time as your tomatoes so it's blooming during peak hornworm season.

One More Thing
The companion planting logic in this article, trap crops, scent masking, predator attraction, isn't unique to tomatoes. It's a system, and once you understand how the pieces fit together, you can point it at almost any pest in the garden.
Article 3 in this series applies that same system to one of the most destructive summer garden pests around: the squash vine borer, with a trap crop configuration that's worth knowing before midsummer hits.
Basil and dill will only get you so far in a single row of tomatoes surrounded by bare soil. Give the wasps, hoverflies, and spiders a reason to stay, and hornworms stop being the season-ending disaster they used to be.
Companion Planting
Discover how to use companion planting to create an ecosystem in your garden that will allow you as the gardener to take a back seat!
Brian Lowell spent decades gardening before he understood why companion planting works — and was willing to admit it. When Penguin Random House asked him to write a book on the subject, he dove into the research and discovered that companion planting is a gardening skillset backed by science and actively used on regenerative farms. Today he shares that knowledge through his YouTube channels Next Level Gardening and Little Homestead Big Dreams, which have reached millions of viewers, and through his Companion Planting class at the School of Traditional Skills.

