Plant basil, carrots, and marigolds near tomatoes to improve growth and reduce pests

The plants you place around tomatoes affect how well they grow, how much they produce, and what insects visit your garden. Some plants repel the pests that damage tomatoes—like hornworms and whiteflies. Others improve soil nutrients or shade the roots when the sun gets intense. A few actually compete with tomatoes for water and nutrients and should stay away.

The best companions are basil, carrots, marigolds, parsley, and borage. These grow well in the same conditions tomatoes need, and several have proven pest-control benefits. Avoid planting brassicas (cabbage, broccoli, kale) and fennel anywhere near tomatoes—they stunt tomato growth and attract different pests that can spread to your tomatoes.

Key Takeaways

  • Basil planted within 12 inches of tomato stems repels spider mites and whiteflies while improving the flavor of nearby tomatoes.
  • Marigolds deter hornworms and other tomato pests, but they need full sun and compete slightly for water, so space them at least 18 inches away.
  • Carrots, onions, and parsley do not compete with tomatoes for nutrients and can be planted directly around the base without harming either crop.
  • Never plant cabbage, broccoli, kale, fennel, or potatoes within 3 feet of tomatoes, as they inhibit tomato growth and attract overlapping pests.
  • Companion planting works best when you also water consistently and remove diseased leaves, since no plant prevents all problems on its own.

Basil: The strongest pest deterrent for tomatoes

Basil is the most effective companion for tomatoes because it repels spider mites, whiteflies, and thrips—three of the most common tomato pests. Plant basil within 12 inches of your tomato stem, either in the same bed or in a pot placed next to the cage. Basil needs the same watering schedule as tomatoes (deep watering when the top inch of soil is dry), so they work well together.

Basil also grows quickly—you can harvest leaves within 4 to 6 weeks of planting—and it actually improves the flavor of nearby tomatoes according to gardeners who have grown both together for years. Plant basil seedlings (not seeds) in spring after the last frost, at the same time you plant tomatoes. If basil gets leggy or stops producing, pinch off the top 2 inches to encourage bushier growth.

Marigolds for hornworm and beetle control

Marigolds are bright, straightforward to grow, and they repel tomato hornworms, beetles, and some aphids. However, marigolds need full sun (at least 6 hours daily) and they compete slightly with tomatoes for water, so plant them at least 18 inches away from the tomato stem. If your tomato bed gets less than 6 hours of direct sun, skip marigolds and use basil instead.

Plant marigold seedlings in spring after the last frost. Water them when the top inch of soil is dry, the same as tomatoes. Deadhead spent flowers (pinch them off) every 3 to 4 days to keep the plant producing new blooms and new pest-repelling compounds. Marigolds will self-seed at the end of the season, so you may see volunteer plants the following year.

Carrots, onions, and parsley for root-level benefits

Carrots, onions, and parsley are safe to plant directly around the base of tomatoes because they occupy different soil depths and do not compete for the same nutrients. Carrots grow downward, onions stay shallow, and parsley spreads sideways—none of them interfere with the deep root system tomatoes need. These three also do not attract the same pests as tomatoes, so they do not increase your pest pressure.

Plant carrot seeds directly in the soil 2 weeks before your tomato transplants go in the ground, so they have a head start. Onion sets (small bulbs) go in at the same time as tomato transplants. Parsley seedlings can go in anytime after the last frost. All three tolerate partial shade from the tomato plant, which actually helps them in very hot climates by keeping their soil cooler.

Borage and nasturtiums as trap crops

Borage and nasturtiums are trap crops—they attract pests away from tomatoes by being more appealing to the insects. Borage attracts hornworms and beetles; nasturtiums attract aphids. Plant them 2 to 3 feet away from tomatoes so the pests land on the trap crop first. You can then remove the infested leaves or let natural predators (ladybugs, parasitic wasps) feed on the pests gathered there.

Borage is a tall plant (18 to 24 inches) with blue flowers and fuzzy leaves. It needs full sun and well-draining soil. Nasturtiums are shorter (12 to 18 inches) and come in red, orange, and yellow. Both are edible—borage flowers taste like cucumber, and nasturtium leaves and flowers are peppery. Plant them in spring after the last frost, and water when the top inch of soil is dry.

Plants to keep away from tomatoes

Brassicas (cabbage, broccoli, kale, Brussels sprouts) and fennel release compounds that stunt tomato growth and reduce yields. Plant them at least 3 feet away, or better yet, in a separate bed. Potatoes are also poor companions because they attract the same pests as tomatoes (Colorado potato beetles, early blight fungus) and compete for similar nutrients. If you grow potatoes, keep them in a different area of the garden.

Corn, dill, and kohlrabi also inhibit tomato growth, though the effect is less dramatic than with brassicas. Avoid planting these within 2 feet of tomatoes. Tomatoes themselves should not be planted in the same spot year after year—rotate to a different bed each season to prevent soil-borne diseases like early blight and fusarium wilt from building up.

Spacing and layout for a companion planting bed

A typical tomato companion bed might look like this: plant tomatoes 24 to 36 inches apart (depending on variety). Place basil seedlings 12 inches from each tomato stem. Plant carrots or onions around the base, 6 inches from the stem. Put marigolds 18 inches away where they get full sun. If you are using nasturtiums or borage as trap crops, place them 2 to 3 feet away at the edge of the bed.

Water the entire bed deeply once or twice a week, depending on heat and rainfall. Mulch around all plants with 2 to 3 inches of straw or wood chips to keep soil moisture consistent and prevent soil-borne diseases from splashing onto leaves. Remove any diseased or yellowing leaves promptly, and watch for pests on the trap crops—if you see heavy infestations, remove those leaves before pests spread to tomatoes.

Frequently Asked Questions

Can I plant basil and marigolds together around the same tomato?

Yes. Plant basil 12 inches from the stem and marigolds 18 inches away on the opposite side. Both need the same watering, and together they cover more pest problems than either one alone. Make sure the marigolds get at least 6 hours of direct sun, or the basil will shade them out.

What if I do not have room for companion plants?

Container tomatoes or very small gardens can still use basil—grow it in a separate pot and place the pot next to the tomato cage. You can also use row covers (lightweight fabric) to protect young tomatoes from pests for the first 4 to 6 weeks, then remove the cover when flowers appear so pollinators can reach the blooms.

Do companion plants prevent all tomato diseases?

No. Companion plants reduce pest pressure and improve growing conditions, but they do not prevent fungal diseases like early blight or powdery mildew. Water at the soil level (not overhead), remove lower leaves as the plant grows, and space plants far enough apart for air circulation. Companion planting works best as part of a full care routine, not as a substitute for it.

When should I plant companions if I am starting from seeds indoors?

Start basil seeds indoors 6 to 8 weeks before your last frost date, the same as tomatoes. Start carrot and parsley seeds outdoors 2 weeks before the last frost. Plant onion sets and marigold seedlings outdoors after the last frost, at the same time as tomato transplants. This timing ensures everything is ready to go in the ground together.

Can I use companion planting in containers?

Yes, but with limits. A 5-gallon container holds one tomato plant and basil, but not much else. Use a 10-gallon container or larger if you want to add carrots or parsley. Marigolds need their own pot because they compete for water. Container soil dries faster than garden soil, so check moisture daily and water when the top inch feels dry.