Companion planting around tomatoes is one of the few garden traditions where the folklore mostly checks out under controlled trials. Basil, marigolds, and nasturtiums genuinely reduce pest pressure on tomatoes; corn, fennel, and brassicas genuinely hurt them. This guide ranks the 12 plants most often paired with tomatoes — six that earn their bed space, six to keep at a 4-foot minimum distance — with the spacing and reasoning behind each pairing. For overall bed prep and tomato spacing strategy, see the season-long playbook in Tomato Plant: Complete Outdoor Growing Guide.
How Companion Planting Actually Works for Tomatoes
Three real mechanisms drive companion planting effects, and understanding which one is at play matters more than memorizing pairings:
- Pest confusion or repulsion. Strong-scented herbs (basil, mint family) mask the volatile compounds tomato pests use to find their host plant.
- Beneficial insect attraction. Flowering companions (nasturtiums, marigolds, alyssum) attract pollinators and predatory insects that eat tomato pests.
- Resource competition. Bad companions either share the same diseases (other nightshades) or compete heavily for the same nutrients (heavy feeders like corn).
The mechanism that does not hold up: chemical “allelopathy” between unrelated plants. Most claims that one plant chemically suppresses another’s growth (outside of black walnut and a handful of similar examples) don’t survive controlled testing.

The Six Best Companion Plants for Tomatoes
1. Basil
The most-cited tomato companion, with real evidence behind it. Basil’s strong volatile oils repel tomato hornworms, whiteflies, and aphids. Trials show 20 to 30% lower hornworm pressure on tomato beds with interplanted basil.
Spacing: Plant 1 basil per tomato, 12 to 18 inches from the tomato base. Don’t crowd — both plants need their own root zone.
Bonus: Tomato + basil is also one of the great culinary pairings. Plant once, harvest two ingredients all season.
2. Marigolds (French marigolds specifically — Tagetes patula)
French marigolds release chemicals from their roots that suppress root-knot nematodes — microscopic soil pests that damage tomato roots. The effect is modest in a single season but compounding if you plant marigolds in the same bed annually for 2 to 3 years.
Spacing: Border the bed perimeter, plus 1 marigold every 4 feet between tomatoes. Use French marigolds, not African (Tagetes erecta) — only French marigolds have the nematode-suppressing trait.

3. Nasturtiums
Aphid trap crop. Aphids preferentially colonize nasturtiums over tomatoes, allowing easy removal of the entire infested plant. The bright flowers also attract pollinators and predatory wasps.
Spacing: Plant along bed edges or as a low groundcover. Nasturtiums sprawl — keep them 18+ inches from tomato bases or they’ll smother low foliage.
4. Carrots
Carrots and tomatoes have non-overlapping root zones — carrots go straight down 8 to 12 inches, tomatoes spread laterally in the top 12. Both can occupy the same bed without competition. Carrots also benefit from the partial shade tomatoes provide in summer.
Spacing: Sow carrots 6 inches from tomato bases. Harvest carrots before tomato canopy fully closes.
5. Garlic and Chives
Allium-family plants (garlic, chives, onions, leeks) repel aphids and spider mites with their sulfur compounds. Garlic also reportedly reduces fungal disease pressure, though evidence here is weaker.
Spacing: 6 to 12 inches from tomato bases. Garlic planted in fall as overwinter crop and harvested mid-summer fits perfectly into the tomato bed cycle.
6. Borage
Underrated companion. Borage flowers attract bumblebees (which buzz-pollinate tomatoes very effectively) and predatory wasps. The fuzzy leaves also deter tomato hornworm moths from laying eggs.
Spacing: 1 borage plant per 6 to 8 tomato plants. Borage self-seeds aggressively — pull volunteers in subsequent years if you don’t want it taking over.

The Six Plants to Keep Away from Tomatoes
1. Brassicas (cabbage, broccoli, cauliflower, kale, Brussels sprouts)
Heavy feeders that compete directly with tomatoes for the same nutrients in the same root zone. Both are also susceptible to overlapping pest pressure (cabbage moth caterpillars will defoliate tomato seedlings if their preferred crop is unavailable). Keep brassicas in a separate bed.
Minimum distance: 4 feet, ideally a different bed entirely.
2. Corn
Corn earworm and tomato fruitworm are the same insect — Helicoverpa zea. Planting corn next to tomatoes essentially doubles the available host habitat and amplifies the pest population for both crops.
Minimum distance: 10 feet, or skip one entirely.
3. Fennel
One of the few real allelopathy cases. Fennel releases compounds that inhibit growth of most nearby plants — tomatoes included. Fennel deserves its own dedicated bed away from everything else.
Minimum distance: Different bed.
4. Other Nightshades (potatoes, peppers, eggplant)
Same family (Solanaceae), same diseases. Late blight, early blight, verticillium, and fusarium wilt all spread between nightshades. Planting potatoes next to tomatoes especially raises late blight risk — a single infected potato plant can wipe out a tomato bed in a week.
Peppers and eggplant are less risky than potatoes and can share a bed if you accept the elevated disease risk, but rotate the entire nightshade family together — never plant tomatoes where potatoes grew last year (or vice versa).
Minimum distance: 4 feet from peppers/eggplant; 10 feet from potatoes; 3-year rotation between any nightshades in the same bed.
5. Walnut Trees (Black Walnut Specifically)
The poster child for allelopathy. Black walnut roots release juglone, a compound that’s actively toxic to tomatoes (and many other vegetables). Affected plants wilt and die within weeks despite normal watering and care.
Minimum distance: 50+ feet from a black walnut tree, or grow tomatoes in raised beds with imported soil.
6. Dill (After Flowering)
Dill is fine when young — it actually attracts beneficial insects. But mature flowering dill stunts tomato growth measurably. The fix: harvest dill heavily before flowering, or grow it in a separate bed.
Minimum distance: 3 feet, with mandatory pre-flower harvest.
Bed Layout: Putting It All Together
A practical 4×8 foot raised bed designed around tomato companion planting:
- Center row: 3 indeterminate tomatoes spaced 36 inches apart.
- Edges (long sides): Alternating basil and French marigolds, one per foot.
- Corners: Borage (1 plant) and chives (1 cluster).
- Underplanting: Carrots sown along the bed center in early spring, harvested before tomato canopy closes.
- Bed edges: Trailing nasturtiums spilling over the sides.
For raised bed construction and soil mix, see Raised Beds and Planters: Complete Guide and Best Soil for Raised Beds. For broader herb companion choices, our Growing Herbs Indoors guide covers indoor seed starting for the basil and chive companions.
Rotation: The Often-Skipped Long-Game
Beyond which plants share a bed in a single season, what you plant where in previous seasons matters as much for tomato yield. Soil-borne tomato diseases accumulate over multi-year monoculture. The minimum rotation: tomatoes go in a bed only every third year, with non-nightshades (legumes, brassicas, alliums, leafy greens) filling the off years.
For the season-long care arc that ties companion planting in with feeding, support, and pest management, see Tomato Plant: Complete Outdoor Growing Guide and Fertilizing Tomatoes: NPK Schedule.
What is the best companion plant for tomatoes?
Basil, by both folklore and modern trials. Basil’s volatile oils repel tomato hornworms, whiteflies, and aphids, with measurable 20 to 30 percent reduction in hornworm pressure. Plant 1 basil per tomato, 12 to 18 inches from the tomato base.
Can I plant peppers next to tomatoes?
You can, but accept elevated disease risk — both are nightshades and share fusarium wilt, verticillium, and blight pathogens. Better practice is to dedicate one bed to all nightshades together, then rotate the whole bed to non-nightshades for 2 to 3 years.
Why are marigolds good for tomatoes?
French marigolds (Tagetes patula specifically — not African marigolds) release chemicals from their roots that suppress root-knot nematodes that damage tomato roots. The effect compounds across multiple seasons in the same bed.
What plants should never go near tomatoes?
Brassicas (cabbage, broccoli, kale), corn, fennel, and other nightshades planted in last year’s tomato bed. Black walnut trees release juglone that is actively toxic to tomatoes within a 50-foot radius.
Does companion planting really work or is it folklore?
It works for specific mechanisms backed by trials — pest deterrence by scented herbs, beneficial insect attraction by flowering companions, and resource non-competition between deep-rooted and shallow-rooted plants. Vague chemical-allelopathy claims between unrelated plants mostly do not survive testing.
How far apart should companion plants be from tomatoes?
Beneficial companions like basil and marigolds: 12 to 18 inches from tomato base. Plants to avoid: minimum 4 feet (or different bed) for brassicas and other nightshades, 10 feet for corn and potatoes, 50 feet from black walnut trees.
