Companion plants that help tomatoes thrive

Certain plants grow well beside tomatoes because they repel pests, improve soil, or use garden space without competing for water and nutrients. Basil is the most reliable choice—it repels aphids and whiteflies while its shallow roots don't interfere with tomato roots. Carrots work well because they grow downward while tomatoes grow upward, and their presence can loosen soil. Marigolds deter nematodes (tiny soil pests) and some beetles. Parsley attracts beneficial insects that prey on tomato pests.

Other strong companions include garlic, onions, and chives—all repel spider mites and aphids. Borage attracts pollinators and deters tomato hornworms. Nasturtiums act as a trap crop, drawing pests away from tomatoes to themselves. Lettuce and spinach grow in the shade cast by tomato plants without stealing sunlight from the main crop.

Key Takeaways

  • Basil is the most effective companion because it repels common tomato pests like aphids and whiteflies while its shallow roots don't compete with tomato roots.
  • Root vegetables like carrots and onions grow downward while tomatoes grow upward, so they use different soil layers and don't compete for nutrients.
  • Marigolds and nasturtiums protect tomatoes by either killing soil pests or drawing pests away from the main plant.
  • Leafy greens like lettuce and spinach thrive in the shade under tomato plants and won't reduce your tomato yield.

Plants that repel tomato pests

Tomatoes attract specific insects—aphids, whiteflies, spider mites, and hornworms—and certain plants naturally repel them. Basil contains oils that insects dislike; plant it within 6 inches of your tomato stem. Garlic and onions release sulfur compounds into the soil that deter mites and some beetles. Plant these 12 inches away from the tomato stem so they don't shade it.

Borage flowers attract parasitic wasps and hoverflies, which lay eggs in tomato pests and kill them from inside. Nasturtiums are a trap crop—pests prefer them to tomatoes, so they congregate on the nasturtium instead. Plant nasturtiums at the edge of your tomato bed, not directly beside it, so pests land there first. Chives repel spider mites and can be planted in clusters around the base of tomato plants.

Plants that improve soil and don't compete

Some companions improve the soil itself rather than repel pests. Legumes like beans and peas add nitrogen to soil through their roots, which tomatoes later use. Plant them in the same bed in rotation (beans one year, tomatoes the next) or in adjacent rows if space allows. Carrots and beets break up compacted soil with their taproots, making it easier for tomato roots to penetrate deeper.

Parsley and cilantro have shallow, fibrous roots that don't reach the depth where tomato roots feed. Both attract beneficial insects—parasitic wasps, ladybugs, and lacewings—that hunt tomato pests. These herbs can be planted directly at the base of tomato plants. Lettuce, spinach, and other leafy greens grow in the shade under tomato foliage and actually benefit from the reduced direct sun in hot climates.

Plants to keep away from tomatoes

Some plants actively harm tomatoes or compete so heavily that they reduce yield. Brassicas (cabbage, broccoli, cauliflower) and tomatoes both attract similar pests and compete for the same nutrients, so keep them at least 3 feet apart. Fennel and dill release chemicals that stunt tomato growth; plant them far from the tomato bed. Potatoes are susceptible to the same diseases as tomatoes (early blight and late blight), so growing them nearby increases the risk that disease spreads between plants.

Corn competes heavily for nitrogen and can shade tomatoes if planted too close. Kohlrabi stunts tomato growth through chemical interference. Walnut trees release juglone, a toxin that kills many plants including tomatoes—avoid planting tomatoes within 50 feet of a walnut. Avoid planting tomatoes near fennel, dill, or any plant you know has struggled with disease in your garden before.

Spacing and planting layout

The distance between tomatoes and companions depends on the companion's size and root depth. Basil, parsley, and chives can be planted 6 to 12 inches from the tomato stem. Carrots, beets, and onions should be 12 inches away so their roots don't tangle with tomato roots as they grow. Larger plants like beans or borage need 18 to 24 inches of space.

In a row garden, plant tomatoes 24 to 36 inches apart, then tuck basil or parsley in the gaps. In a raised bed, arrange tomatoes in the back or center (so they don't shade other plants), and plant companions in front or around the edges. In containers, plant one tomato per 5-gallon pot and add basil or parsley to the same pot—their roots occupy different depths and won't compete. Water all plants together; companions that prefer drier soil (like oregano) should go in a separate pot.

Timing and seasonal companion planting

Plant basil, parsley, and other herbs at the same time as tomatoes or up to two weeks after, once soil has warmed. Carrots and beets can be planted at the same time as tomatoes or earlier if your soil is workable. Beans and peas should be planted after the last frost date, same as tomatoes. Lettuce and spinach can be planted around tomatoes in spring, then replanted in late summer for a fall crop in the shade of mature tomato plants.

If you're planting in succession (new tomatoes every few weeks), plant new basil and parsley with each tomato crop so you always have fresh herbs at the same growth stage. Marigolds and nasturtiums can be direct-seeded around tomatoes once soil reaches 60°F. Remove any companion that shows disease or pest damage before it spreads to tomatoes—don't assume the companion is protecting the tomato if the companion itself is struggling.

Frequently Asked Questions

Can I plant basil in the same pot as a tomato?

Yes. Basil and tomato roots occupy different depths—basil roots stay in the top 6 inches, tomato roots go deeper—so they don't compete. Use a pot at least 5 gallons for one tomato and one basil plant. Water regularly because two plants in one pot dry out faster than one plant alone.

Will marigolds really keep pests off my tomatoes?

Marigolds kill nematodes in the soil and deter some beetles, but they won't stop aphids or whiteflies on their own. They work best as part of a mix—plant marigolds, basil, and nasturtiums together for broader pest protection. Marigolds are most effective when planted in spring so they're established before pests arrive.

What if I don't have room for companion plants?

Basil in a small pot next to the tomato bed gives you most of the pest-repelling benefit without taking up garden space. You can also plant companions in the off-season—lettuce in spring before tomatoes, then again in fall after tomatoes end. If space is very tight, focus on keeping the tomato bed clean and removing pests by hand.

Can I plant tomatoes and beans in the same bed?

Yes, but plant beans after tomatoes finish for that season, or in a different section of the bed. Growing them together in the same year works if you give beans their own row at least 18 inches from tomatoes. Beans add nitrogen as they grow, which benefits the soil for next year's tomatoes.

Do I need to use all these companion plants?

No. Basil alone gives you significant pest protection and is straightforward to grow. Add marigolds or nasturtiums if you have space. Carrots or lettuce are useful if you want to grow food in the same bed. Start with one or two companions and add more next season if you want to experiment.