The best companions for tomatoes grow nearby and either repel pests, improve soil, or avoid competing for the same nutrients
Basil is the most reliable companion—it repels spider mites and whiteflies while improving tomato flavor. Plant it 12 inches away at the same time you transplant tomatoes. Carrots and onions don't compete for nutrients since they feed at different soil depths; carrots loosen soil that tomato roots will use later. Marigolds deter nematodes (microscopic pests that damage roots) and look good in a bed. Parsley attracts beneficial insects that eat aphids and hornworms.
Avoid planting tomatoes near brassicas (cabbage, broccoli, kale), fennel, or potatoes. Brassicas and tomatoes compete for the same nutrients and attract overlapping pests. Fennel actually stunts tomato growth. Potatoes share diseases with tomatoes, especially early and late blight.
Key Takeaways
- Basil planted 12 inches from tomato stems repels spider mites and whiteflies while you harvest both plants together.
- Carrots and onions grow at different soil depths than tomatoes, so they don't steal nutrients or water.
- Marigolds and parsley attract beneficial insects or repel root pests without needing extra space or care.
- Keep tomatoes away from brassicas, fennel, and potatoes, which either compete for nutrients or spread disease.
- Space companions at least 12 inches from the tomato stem to prevent crowding and allow air circulation.
Herbs that grow well with tomatoes
Basil is the standard choice because it thrives in the same warm conditions as tomatoes and actively repels common tomato pests. Plant it when you transplant tomatoes into the garden, spacing it 12 inches away from the stem. You'll harvest both at the same time in late summer, and the basil will be stronger from the proximity to tomato foliage.
Parsley attracts hoverflies and parasitic wasps—insects that lay eggs in or eat tomato hornworms and aphids. It grows slowly at first but fills in by mid-season. Oregano and thyme also work; they're drought-tolerant and won't compete for water once established, though they don't offer the same pest control as basil or parsley.
Root vegetables and alliums that don't compete
Carrots are one of the safest companions because their roots go deep while tomato roots spread sideways in the top 12 inches of soil. They actually help by breaking up compacted soil. Plant carrot seeds in early spring, 6 inches away from where you'll later transplant tomatoes, so the carrots are already established when tomatoes go in.
Onions, garlic, and leeks repel spider mites and some fungal diseases. They feed on different nutrients than tomatoes and won't shade the plant if you keep them on the north side of the bed. Beets also work—they're deep feeders and won't steal nitrogen from the tomato.
Flowers that protect tomatoes from pests
Marigolds are planted specifically to reduce root-knot nematodes, which are invisible pests that live in soil and damage roots. Plant marigolds in the same bed in spring, even before you know where tomatoes will go; the nematode-killing effect builds over the season. Space them 8 to 10 inches apart in clusters around the bed.
Nasturtiums act as a trap crop—aphids prefer them to tomatoes, so the pests congregate on the nasturtiums instead. Plant them at the edge of the bed or in containers nearby. Borage attracts bees for pollination and deters hornworms. All three flowers are edible, so nothing goes to waste.
Plants to keep away from tomatoes
Brassicas (cabbage, broccoli, cauliflower, kale) compete with tomatoes for nitrogen and potassium. Both crops also attract similar pests—cabbage moths and flea beetles will move between the plants. If you grow brassicas, plant them in a separate bed at least 3 feet away.
Fennel actively inhibits tomato growth through a chemical it releases into the soil, so avoid it entirely. Potatoes share early blight and late blight with tomatoes; if one plant gets sick, the other will follow. Plant potatoes in a different area of the garden, ideally not in the same spot year after year.
Corn and tomatoes both attract similar pests and compete for nitrogen. Dill can attract hornworms, so save it for a separate section. Walnut trees release a substance called juglone that kills many plants, including tomatoes—stay at least 50 feet away.
Spacing and timing for companion planting
The 12-inch rule applies to most companions: measure from the tomato stem to the center of the companion plant. This spacing prevents crowding, allows air to circulate (which reduces fungal disease), and gives each plant room to spread. Basil and parsley can go closer—8 to 10 inches—because they're smaller at maturity.
Plant fast-growing companions like basil and lettuce at the same time as tomatoes. Slower companions like carrots should go in 2 to 3 weeks earlier so they're established before tomato roots expand. Marigolds can go in anytime in spring; they'll bloom by the time tomatoes are tall enough to need pest protection.
In containers, space is tighter. A 5-gallon pot can hold one tomato and one basil plant 10 inches apart. Larger containers (10+ gallons) can fit a tomato, basil, and one trailing nasturtium at the edge. Don't overcrowd—poor air circulation leads to disease.
Common mistakes with companion planting
The biggest mistake is planting companions too close. Even basil, the most compatible herb, will shade lower tomato leaves if it's touching the stem. This traps moisture and invites fungal disease. Measure the distance before planting, not after.
Another error is assuming all herbs help equally. Dill, fennel, and some varieties of mint actually harm tomatoes or attract the wrong pests. Stick to basil, parsley, oregano, and thyme if you're uncertain.
Gardeners also plant brassicas nearby without realizing they compete for nitrogen. If you want both in the same bed, add extra compost or fertilizer to support both crops, or space them 4 feet apart instead of the standard 12 inches.
Frequently Asked Questions
Can I plant lettuce and spinach with tomatoes?
Yes. Both are cool-season crops that mature before tomatoes get tall, so they won't compete for light. Plant them in early spring around the tomato base, and harvest them by early summer before the tomato canopy shades them out. They actually help by keeping soil cool and moist.
Does garlic really help tomatoes?
Garlic repels spider mites and some fungal diseases, and it doesn't compete for nutrients. Plant garlic cloves in fall (October or November in most regions) so they're established before spring tomato planting. They'll be ready to harvest in late spring, just before tomatoes need the space.
What if I already planted tomatoes next to brassicas?
Move the brassicas to a different bed if possible, or thin them heavily so they're at least 3 feet apart from tomatoes. Add extra nitrogen-rich compost around both plants to reduce competition. Monitor for pests more closely since both crops will attract similar insects.
Can I plant tomatoes in the same spot every year?
No. Tomatoes deplete soil nitrogen and leave behind disease spores. Rotate to a different bed each year, or wait at least two years before replanting tomatoes in the same spot. Plant nitrogen-fixing crops like beans or peas in the off years to rebuild soil.
How close can basil be to a tomato plant?
Plant basil 8 to 10 inches from the tomato stem. This is close enough for basil to repel pests but far enough that it won't shade the lower leaves or trap moisture. If basil gets taller than 12 inches, pinch off the top leaves to keep it bushy and low.