Plants That Keep Common Tomato Pests Away

Basil, marigold, and nasturtium are the three plants most gardeners plant alongside tomatoes to reduce insect damage. Basil repels spider mites, whiteflies, and hornworms through its strong scent. Marigolds deter aphids and some beetles. Nasturtiums act as a trap crop — pests prefer them to tomatoes, so they feed on the nasturtiums instead, leaving your fruit alone.

Borage and cilantro also work, though differently. Borage attracts beneficial insects like parasitic wasps that hunt tomato hornworms and other pests. Cilantro does the same and can be harvested for cooking. Neither repels insects directly; they bring in the predators that eat the ones damaging your plants.

The catch is that no single companion plant stops all tomato pests. Hornworms, aphids, spider mites, whiteflies, and flea beetles each respond to different plants. A mix of three or four companions gives you broader protection than one alone.

Key Takeaways

  • Basil, marigold, and nasturtium are the most reliable companions for tomatoes because they either repel pests or draw them away from your fruit.
  • Borage and cilantro bring in parasitic wasps and other beneficial insects that hunt tomato pests rather than repelling the pests themselves.
  • Planting companions 12 to 18 inches from your tomato stem gives them room to grow without competing for water and nutrients.
  • Companion planting reduces pest pressure but does not eliminate it — you may still see some damage, especially in wet summers when fungal diseases spread.

How to Space Companion Plants Around Tomatoes

Plant basil, marigold, or nasturtium 12 to 18 inches away from the base of your tomato stem. This distance lets both plants access water and nutrients without one shading or crowding the other. If you are planting in a container, one tomato with one basil plant works; two companions in the same pot usually compete too much.

Borage and cilantro can go closer — 8 to 12 inches — because they are smaller and shorter-lived. Cilantro especially bolts (goes to seed) in 4 to 6 weeks, so you can replant it mid-season for a second round of beneficial insects.

In a row garden, alternate tomatoes and companions: tomato, basil, tomato, marigold, tomato, nasturtium. This pattern keeps pests from moving easily between plants while giving each one adequate space.

Which Pests Each Companion Plant Targets

Basil is most effective against spider mites, whiteflies, and tomato hornworms. The oils in basil leaves repel these insects. Plant it early in the season, as soon as soil warms, so it is established before hornworms arrive in mid-summer.

Marigolds deter aphids and some beetles, particularly through their root secretions, which affect soil-dwelling pests. They also attract hoverflies, which eat aphids. Marigolds bloom continuously from planting until frost, so they work the entire season.

Nasturtiums are trap crops: pests eat them instead of tomatoes. They are especially useful for aphids and some beetles. The downside is that nasturtiums can become infested themselves, so inspect them weekly and remove heavily damaged leaves to prevent pests from spreading to nearby tomatoes.

Borage and cilantro do not repel pests but attract parasitic wasps, tachinid flies, and other predatory insects. These beneficial insects lay eggs in or on tomato pests, killing them from inside. Borage blooms for months; cilantro is faster but shorter-lived.

When to Plant Companions and How Long They Last

Plant basil and marigolds at the same time as your tomatoes, after the last frost date. Both need warm soil and will rot if planted too early. Nasturtiums can go in a week or two later if you are starting from seed, or at planting time if you buy transplants.

Basil and marigolds last until the first hard frost in fall, matching your tomato season. Cilantro bolts in heat, so plant it in spring for early-season pest control, then replant in late summer (6 to 8 weeks before your first frost) for fall protection. Borage self-seeds and can spread, so deadhead spent flowers if you do not want it returning next year.

Nasturtiums also self-seed. If you want them back next year, leave a few flowers on the plant to set seed. If not, pull them out after frost.

Companion Plants to Avoid Near Tomatoes

Fennel and dill can stunt tomato growth and should not be planted nearby. Brassicas (cabbage, broccoli, kale) compete heavily with tomatoes for nutrients and attract some of the same pests, so they are better in a separate bed. Potatoes and peppers are in the same family as tomatoes and share many of the same diseases, so keep them at least 3 feet away.

Corn can shade tomatoes and attract pests like hornworms, so plant it on the north side of your garden where it will not block sun. Mint spreads aggressively and will overtake a tomato bed; grow it in a pot instead.

What Companion Planting Does and Does Not Do

Companion planting reduces pest pressure by making your garden less attractive to insects and by bringing in their predators. A well-planted tomato bed with basil, marigold, and borage will have fewer aphids, hornworms, and spider mites than one planted alone. You will likely see some damage still — a few chewed leaves, some yellowing — but not the severe infestations that can defoliate or kill plants.

Companion planting does not stop fungal diseases like early blight or powdery mildew, which spread through water and humidity rather than insect preference. It also does not prevent all pest damage in wet summers when insects breed faster or in years when a particular pest population explodes. Companion planting is one tool, not a complete solution.

If you see heavy pest damage despite companions, inspect the affected leaves and stems to identify which pest is present. Hornworms leave large holes and dark droppings; spider mites cause fine yellowing and webbing; aphids cluster on new growth and excrete sticky honeydew. Once you know what you are dealing with, you can decide whether to hand-pick, spray neem oil, or use another method.

Frequently Asked Questions

Can I plant tomatoes and basil in the same pot?

Yes, one tomato and one basil plant in a 5-gallon pot works well. Basil is shallow-rooted and will not compete heavily with the tomato's deeper roots. Water regularly because two plants in one pot dry out faster than one alone. Pinch basil leaves as it grows to encourage bushiness and prevent it from flowering too early.

Do I have to use all of these plants or just one?

One companion plant is better than none, but three or four give you broader protection. If space is tight, plant basil and marigold — together they cover most common tomato pests. If you have room, add borage or cilantro for beneficial insects.

What if I plant companions but still get hornworms?

Basil reduces hornworm numbers but does not stop them entirely. Check plants weekly for large holes and dark droppings on leaves. Hornworms are large and straightforward to spot by hand; pick them off and drop them in soapy water. If you see many, spray neem oil in the evening when beneficial insects are less active.

Can I eat the basil and marigolds I plant with tomatoes?

Basil is meant to be harvested and eaten — picking leaves encourages bushier growth. Marigold petals are edible and slightly peppery, though most gardeners grow them for pest control and leave them on the plant. Nasturtium flowers and leaves are both edible and have a peppery taste.

When should I plant companions if I am starting tomatoes from seed indoors?

Start basil and marigold seeds indoors at the same time as tomatoes, 6 to 8 weeks before your last frost date. They germinate and grow at similar speeds, so they will be ready to transplant together. Nasturtium seeds are large and can be direct-seeded outdoors after frost, or started indoors 4 weeks before transplanting.