Plants That Are Good to Plant Near Tomato Plants to Prevent Insects

Hunker may earn compensation through affiliate links in this story.

Tomatoes (Lycopersicon esculentum) thrive in sunny locations where they're prized for their juicy, red fruit. Humans aren't the only fans of tomatoes. Various insects are also attracted to their fruit and foliage. Instead of turning to toxic pesticides, protect your tomato crop by planting companion plants that repel pests. Several herbs and flowers can help to defend tomatoes from some of the plant's most common enemies.


  • Some plants, such as many herbs, have very strong odors. Pests may find these odors offensive. The companion plant's smell may also hide the scent of the tomato plant and keep pests from locating the tomatoes.
  • Other plants release biological substances that directly kill pests.


The basil plant (Ocimum basilicum) has fragrant foliage that repels tomato hornworms and various flies from around tomato plants.

This annual herb thrives in well-draining, moist soil and needs full sun, meaning it requires a minimum of six hours of direct sunlight every day. Most basil shrubs grow approximately 2 feet high and 2 feet wide. When planting basil near a tomato plant, space them apart by approximately 21 inches.



To figure out how closely you can place any companion plant to your tomato plant, simply use the average spacing requirements between the two different plants. For example, most large basil varieties need 18 inches between each other, while tomatoes need approximately 24 inches of space. The total is 42 inches, and the average between the two is 21.


Protect tomatoes from tomato worms by growing borage (Borago officinalis) near the tomato plant. The full sun-loving annual herb has fragrant leaves and blossoms that repel pests, while the flowers also attract butterflies and bees to the garden. The entire plant is edible, including its flowers. Similar to tomato plants, borage plants grow best in soil that's rich in organic matter, so consider mixing a couple inches of compost into the planting site. For effective pest control, plant borage approximately 12 inches away from the tomatoes.


Many common tomato pests find the odor of marigold flowers (Tagetes spp.) repulsive. These pests include:


  • Whiteflies
  • Mexican bean beetles
  • Tomato hornworms

This annual flower also release a biological substance through its roots known as alpha-terthieny, which is toxic to more than a dozen kinds of nematodes that may occasionally attack tomato roots.

All marigold varieties thrive best in full sun, but they can tolerate a wide range of soil conditions, including sandy soil, loam and clay. Tall marigold varieties, such as Tagetes erecta, can grow as high as 3 feet. Smaller varieties, such as French marigolds (Bushy T. patula), can be as short as 6 inches. Space tall marigolds approximately 2 feet away from tomatoes. Shorter varieties can be placed approximately 1 foot away.



The entire mint family (Mentha spp.) may have a sharp, minty scent that humans find refreshing, but many pests are repelled by the smell. These perennial herbs thrive best in U.S. Department of Agriculture plant hardiness zones 4 through 9, with most varieties doing best in partial to full sun -- that's a minimum of four to six hours of direct sunlight -- and well-draining soil.

When grown near tomatoes, mint helps protect against the following pests:


  • Cabbage moths
  • Aphids
  • Ants
  • Flea beetles

Place mint plants approximately 2 to 3 feet away from tomatoes.


Mint grows quickly and can sometimes turn invasive. Consider growing this herb in a 12-inch or larger pot. Use a pot with bottom drainage holes and fill it with well-draining potting mix. This allows you to take advantage of mint's pest-deterring power while preventing it from freely spreading through your garden.


The trailing vines of the annual nasturtium (Tropaeolum majus) produce brightly colored, edible flowers that have a peppery flavor. The plant repels the following insects:

  • Aphids
  • Pumpkin beetles
  • Squash beetles
  • Cabbage moths
  • Potato beetles
  • Whiteflies


Nasturtiums need full sun. They grow best in well-draining, moist soil, but they can also survive in droughty soil that has low soil nutrients. This makes them ideal for low-maintenance vegetable gardens. Space nasturtiums and tomatoes 1 to 2 feet apart.


Onions (Allium cepa) are renowned for their strong smell and taste, which adds flavor to a wide variety of meals. Bug pests find the odor less attractive, with onions protecting tomatoes from:


  • Borers
  • Mites
  • Slugs
  • Tomato cutworms

Onions need full sun and well-draining, moist soil with high levels of soil nutrients. Keep onions and tomatoes apart by approximately 12 to 18 inches.



Joshua Duvauchelle

Joshua Duvauchelle is a certified personal trainer and health journalist, relationships expert and gardening specialist. His articles and advice have appeared in dozens of magazines, including exercise workouts in Shape, relationship guides for Alive and lifestyle tips for Lifehacker. In his spare time, he enjoys yoga and urban patio gardening.