Tomatoes are the most popular vegetable in the American home garden, and nearly everyone has an opinion on what to grow next to them.
The truth is that if you plant the right neighbors, your tomatoes will produce better, handle pests more naturally, and come through the season healthier. Plant the wrong ones, and you can create problems that follow your crop for weeks.
This guide covers companion planting with tomatoes in depth, including the companions that genuinely help tomatoes, the reasoning behind each pairing, and a clear list of what to grow on the far side of the garden.
Companion planting isn’t magic; it’s applied ecology. It works by using natural plant relationships to create a better environment in the garden that repels pests, attracts pollinators and beneficial insects, improves soil structure, and makes more efficient use of limited space.
Tomatoes are heavy feeders and susceptible to a range of pests and diseases, which means they benefit more than most crops from intentional plant placement.
The Best Companion Plants for Tomatoes
Basil

Basil is the most popular tomato companion, and it earns its good reputation.
When planted nearby, basil is believed to repel thrips and aphids, two pests that commonly target tomato plants throughout the season.
The strong volatile oils in basil leaves are the likely mechanism, masking the scent cues that draw pests in. Some gardeners also report that the flavor of nearby tomatoes improves, though that’s harder to verify. Consider it a bonus.
From a practical standpoint, basil is an ideal neighbor because it thrives in the same site conditions: full sun, consistent moisture, and warm temperatures.
It stays compact enough to fit between tomato plants without competing for light, and if you let a few stems flower rather than cutting them back, they attract pollinators that benefit everything in the bed.
Marigolds

Marigolds belong in every tomato grower’s toolkit.
French marigolds (Tagetes patula) in particular produce a substance from their roots called alpha-terthienyl, which has been shown to suppress root-knot nematodes, which are microscopic soil pests that attack tomato roots and are notoriously difficult to treat once established.
For this benefit to work, you need marigolds planted densely in the bed, ideally the season before you want nematode suppression.
Scattering a few along the garden border is better than nothing, but dense planting is what actually moves the needle.
Above the soil, marigold flowers attract parasitic wasps and hoverflies, which are beneficial insects that prey on aphids, hornworms, and other common tomato pests.
The scent also deters whiteflies. They’re low-maintenance, widely available, and one of the few companions where the evidence is solid.
Borage
Borage is an underused companion that deserves more attention in the home garden.
Its blue star-shaped flowers attract pollinators and predatory insects throughout the growing season, and it’s been grown alongside tomatoes and squash for this purpose for a long time.
Some gardeners report fewer tomato hornworms in beds where borage is established nearby, though most of the evidence is observational rather than controlled.
One thing to know before you plant it: borage self-seeds aggressively. Once it’s in the garden, you’ll have it every year.
Plant it where you’re comfortable with it returning on its own, and remove spent flower heads if you want to limit its spread.
Carrots
Carrots and tomatoes are a classic pairing for a straightforward reason: they occupy different root zones. Tomatoes root between 12 and 24 inches deep.
Carrots push much deeper than that. They don’t compete directly for moisture or nutrients, which makes them space-efficient companions in raised beds where square footage matters.
Carrots also loosen compacted soil as their roots grow downward, which improves aeration around tomato root zones.
Plant carrots early, before your tomato transplants go in, so they’re established before they need to share the bed. The timing works well in most climates.
Nasturtiums
Nasturtiums work as a trap crop for aphids. Aphids have a strong preference for nasturtiums over most vegetables, which means they’ll flock to the nasturtiums and largely leave your tomatoes alone.
This is intentional. You’re giving the pests something they like more, so your main crop stays cleaner.
Check nasturtiums regularly throughout the season, and knock off aphid colonies with a blast of water, or remove heavily infested stems before populations explode.
Nasturtiums also attract beneficial predatory insects, the flowers and leaves are edible, and they sprawl naturally between tomato plants without shading them out.
They’re one of the most useful and versatile companions in a vegetable garden.
Parsley
Parsley attracts beneficial wasps and other predatory insects when it flowers in its second year. In the first year, it’s a compact, low-maintenance fill plant that fits easily between rows.
It won’t compete with tomatoes for space or nutrients, won’t attract problem pests, and requires very little attention.
Not every companion needs to be dramatic; parsley does a quiet job consistently, and that’s enough.
Garlic

Garlic has natural antifungal properties and is widely thought to repel aphids and spider mites when planted near susceptible crops.
In the tomato bed, it may help reduce early blight and fungal pressure, which is a real concern in humid climates or in seasons with heavy rainfall. It also deters deer, rabbits, and some other browsing animals.
One planning note: garlic is a fall-planted crop. Get it in the ground in October or November in most zones, and it’ll be ready to harvest right around the time your tomato transplants are going in the following spring.
That seasonal timing works out cleanly, and the garlic harvest frees up space in the bed just as the tomatoes need room to expand.
Quick-Reference Chart for Companion Planting With Tomatoes
- Basil: Repels thrips and aphids; attracts pollinators when flowering; thrives in the same conditions as tomatoes.
- Marigolds: Suppresses root-knot nematodes; repels whiteflies; attracts beneficial insects; plant densely for best effect.
- Borage: Attracts pollinators; may deter hornworms; self-seeds aggressively; plan for it to return each year.
- Carrots: Shares space without competing; loosens deep soil to improve root zone aeration.
- Nasturtiums: Trap crop for aphids; attracts beneficial insects; flowers and leaves are edible.
- Parsley: Attracts predatory wasps when it flowers; compact and easy to manage.
- Garlic: Antifungal properties; repels aphids and spider mites; fall-planted, spring-harvested.
Plants To Keep Away From Tomatoes
Fennel
Fennel is one of the most reliably hostile plants in the vegetable garden. It produces allelochemicals, compounds that inhibit the germination and growth of neighboring plants, and tomatoes are among the most affected.
Fennel and tomatoes should never share a bed. Keep fennel in its own container or in a dedicated section of the garden, well away from tomatoes and most other vegetables.
Brassicas
Brassicas such as cabbage, broccoli, kale, cauliflower, and Brussels sprouts compete heavily with tomatoes for nutrients, particularly calcium.
Calcium deficiency in tomatoes shows up as blossom end rot: a dark, sunken patch on the bottom of the fruit that ruins what would have been a perfect tomato.
Growing brassicas near tomatoes increases the competition for the calcium both crops need.
Beyond nutrients, brassicas attract pest populations that can easily migrate to nearby tomato plants and create a second wave of problems mid-season.
Corn
Corn and tomatoes share a major pest. The corn earworm and the tomato fruitworm are the same insect, Helicoverpa zea, just targeting different crops.
Plant them together, and you’re concentrating the habitat for this pest in one area of the garden. Corn also grows tall and fast, and without careful row orientation, it will shade out your tomatoes before the season peaks.
These two are better off at opposite ends of the garden with as much distance between them as your space allows.
Potatoes
Tomatoes and potatoes belong to the same plant family, Solanaceae, which means they share susceptibility to the same diseases, most notably early blight and late blight.
Growing them close together makes it easy for disease to spread between plants. If one crop gets infected, the other is at significantly higher risk.
Keep them separated by as much space as you can manage, and rotate them out of the same bed on alternating seasons. Don’t follow a tomato crop with potatoes, or potatoes with tomatoes, in the same spot.
Dill (After It Bolts)
Young dill is sometimes cited as a tomato companion, and there’s some evidence that it attracts beneficial insects. The problem is that once dill goes to seed, it can inhibit tomato growth.
If you want both in the garden, plant dill where it won’t cross paths with maturing tomatoes, and harvest it before it flowers if they’re close together. It’s more of a nuance than a hard rule, but it’s worth planning around.
Build a Better Bed, One Plant at a Time
Companion planting rewards patience and observation.
One marigold at the corner of your raised bed won’t transform your tomato harvest, but a thoughtfully arranged bed, planted with intention each season, compounds its benefits over time.
Pests lose reliable footholds. Beneficial insects find a home. Soil structure improves gradually.
Start with one or two companions this season. Basil and marigolds are the most accessible starting point, and together they address the most common tomato problems (aphids, whiteflies, and nematodes) without any complicated timing.
Add borage and nasturtiums the following year, and you’ll have a bed that’s doing active pest management on its own.
Keep a simple garden journal. When something works well or badly, write it down. Include what grew together, what didn’t, what pests showed up, and where.
Companion planting is ultimately a system you refine over multiple seasons, and the notes you take this year are what make next year’s garden smarter.

