Plant basil, French marigolds, chives, borage, nasturtiums, lettuce and carrots with tomatoes. Keep fennel, brassicas, potatoes, corn and anything inside a walnut tree's root zone away from them. Two of those pairings have real research behind them rather than tradition: basil primes the tomato's own wound response, and French marigolds suppress root-knot nematodes in the soil. The rest earn their place by shading bare soil, pulling in predatory insects, or filling space the tomatoes are not using.
You have spent weeks nurturing tomato seedlings, carefully hardening them off, and finally transplanting them into the garden — only to watch aphids descend, hornworms appear, and fruit production disappoint. The good news? The right companion plants can reduce pest pressure, boost yields by up to 20%, and make your garden more productive per square foot, according to research from West Virginia University. Companion planting is one of the oldest gardening techniques in the world, and modern science is catching up with what observant growers have known for generations — some plants genuinely help tomatoes thrive, while others actively work against them.
This guide covers the best and worst companion plants for tomatoes based on university extension research and peer-reviewed studies — not internet folklore. Whether you are working with a 4 x 4 foot (1.2 x 1.2 m) raised bed or a full backyard plot, you will know exactly what to plant next to your tomatoes, how far apart to space them, and which plants to keep well away. Setup takes about 30 minutes of planning and one afternoon of planting.
What you will learn in this guide:
Key Takeaway
Companion planting works best when you focus on a few validated combinations — basil, marigolds, and aromatic herbs — rather than trying to implement every recommendation you find online. The science supports specific pairings through pest deterrence, volatile signalling, and beneficial insect attraction, not through vague "good vibes" between plants.
Most searches for tomato companions are really one question about one specific plant. These are the twelve asked most often, with the short answer and the reason behind it.
| Plant | With tomatoes? | Why |
| Basil | Yes, 1:1 | Primes the tomato wound response; no effect on flavour |
| French marigold | Yes, at the edges | Root exudates suppress root-knot nematodes |
| Carrots | Yes | Different root depth, so no direct competition |
| Lettuce | Yes | Uses the shade under the tomato canopy in midsummer |
| Peppers | Yes, with spacing | Same family, so same diseases: give air movement and never rotate one onto the other |
| Cucumbers | Yes, with support | Both are heavy feeders and both need airflow; trellis them apart |
| Zucchini and squash | Possible, rarely wise | A footprint and airflow problem, not a chemical one |
| Onions and garlic | Yes | Narrow leaves, shallow roots, no measured yield penalty |
| Potatoes | No | Same family, shared blight and spotted wilt virus |
| Brassicas | No | Glucosinolate allelopathy; 55 in (140 cm) minimum if unavoidable |
| Fennel | No | Allelopathic root secretions stunt every nightshade |
| Corn | No | Competes hard for water and nitrogen and shares pests |
Sources: University of Minnesota Extension, Texas A and M AgriLife Extension, Virginia Tech Extension, UC Agriculture and Natural Resources.
Basil (Ocimum basilicum) is the single most research-backed tomato companion. A peer-reviewed study published in PMC (2024) found that volatiles released from basil leaves prime tomato plants to respond more rapidly to pest attack by boosting the expression of wound-response genes — specifically the Pin2 gene that produces protease inhibitors against chewing insects. This is not folklore. The priming effect works through airborne signals, meaning basil does not even need to touch the tomato plant to confer benefits.
Field trials show that tomato-basil intercropping at 50% basil density produces a Land Equivalent Ratio of 1.9, meaning the combined output from the same area nearly doubles compared to growing each crop separately. Plant basil 12 to 18 inches (30 to 45 cm) from your tomatoes in a 1:1 row arrangement for best results. One important myth to bust: Texas A&M AgriLife Extension confirms that basil does not improve tomato flavour — the benefits are purely pest-related and growth-related.
Marigolds (Tagetes patula) are the second essential tomato companion, and for a specific reason: their roots produce alpha-terthienyl, a compound that kills root-knot nematodes in the soil. Research from the University of Hawai'i demonstrated that French marigolds suppressed approximately 50% of root-knot nematode populations when planted immediately after a nematode-susceptible crop. The cultivar 'Single Gold' has been shown to suppress multiple nematode genera. African marigolds (Tagetes erecta) are less effective — stick with French marigolds for the best results. Beyond nematodes, marigolds produce pyrethrum that repels tomato hornworm moths and attract pollinators and ladybugs.
Aromatic herbs from the carrot family (dill, cilantro, parsley) provide a different kind of benefit: when they bolt and flower in summer heat, they attract ladybugs, lacewings, parasitic wasps, and hoverflies — all natural enemies of common tomato pests. Penn State Extension confirms that these flowering herbs are excellent for beneficial insect support. The key is to let them flower rather than harvesting them continuously. Their bloom period conveniently overlaps with peak tomato pest pressure in midsummer.
Other validated companions: Onions and garlic deter aphids and spider mites through sulphurous compounds. Nasturtiums work as trap crops — they attract aphids to themselves, pulling them away from your tomatoes. And legumes (beans, peas, clover) fix nitrogen in the soil through symbiotic bacteria in their root nodules, reducing your need for fertilizer. Our companion planting chart covers the full list of compatible pairings.
| Companion Plant | Primary Benefit | Mechanism | Spacing From Tomatoes |
| Basil | Pest defence + yield boost | Volatile signalling, thrip/hornworm deterrence | 12-18 in (30-45 cm) |
| French marigold | Nematode suppression | Alpha-terthienyl root exudates | Bed corners/margins |
| Dill / cilantro / parsley | Beneficial insects | Flowers attract lacewings, wasps, hoverflies | 18-24 in (45-60 cm) |
| Onions / garlic | Pest deterrence | Sulphurous compound emissions | 6-12 in (15-30 cm) |
| Nasturtiums | Trap crop for aphids | Preferential attraction away from tomatoes | 12-24 in (30-60 cm) |
| Beans / peas | Soil nitrogen enrichment | Biological nitrogen fixation via rhizobia | 12-18 in (30-45 cm) |
Sources: Texas A and M AgriLife Extension, University of Minnesota Extension, Penn State Extension, PubMed Central (basil wound-response study).
Why This Works: Guild Planting
In permaculture, this approach is called a guild — a group of plants selected to fill different functional roles so they support each other rather than compete. Your tomato sits at the center. Basil deters pests. Marigolds clean the soil. Beans fix nitrogen. Nasturtiums draw aphids away. Each plant has a job, and together they create a self-regulating system that needs less intervention from you. It is the same principle behind natural ecosystems, scaled down to a garden bed. You can explore this concept further in our beginner's guide to permaculture.
Match the companion to the pest, not the pest to the plant. Basil earns its place against thrips and aphids, French marigold against root-knot nematodes and the hornworm moth, nasturtium against aphid colonies, and flowering dill or parsley against anything a ladybug or a parasitic wasp will eat. This table reads the opposite way round from the rest of this guide: start with the damage in front of you, then the companion that has research behind it, then the honest limit of what planting can do.
| Pest and what you see | Companion with evidence | What it actually does | What it will not do |
| Tomato hornworm: leaves and stem tips stripped overnight, dark pellets on the soil below | French marigold at the bed margins, plus dill, cilantro or parsley left to flower | Marigold pyrethrum deters the egg-laying moth; the flowering umbels feed the parasitic wasps that attack larvae already on the plant | Nothing stops caterpillars that are already feeding. Hand-pick those first, then let the flowers work on the next generation |
| Aphids: clusters on growing tips, sticky honeydew, sooty mould following it | Nasturtium as a trap crop, onions and garlic nearby, flowering dill and parsley | Nasturtiums pull colonies onto themselves, allium sulphur compounds deter arrivals, and the open flowers bring in ladybugs and hoverflies, the two predators that clear a bed quickest | It will not beat a colony that ants are farming. Ants herd aphids and drive the predators off the plant, so the ant trail is the first thing to deal with |
| Thrips: silvery scarring and flecked leaves, sometimes with distorted new growth | Basil, interplanted 12 to 18 in (30 to 45 cm) away | The priming effect measured in the PubMed Central study deters thrips specifically, and thrips are what carry tomato spotted wilt virus into a bed | It will not reverse the virus once thrips have delivered it. That plant comes out, and no neighbour changes it |
| Root-knot nematode: plants that stunt and wilt in heat, knobbly galls on the roots when you pull one | French marigold 'Single Gold', grown as a rotation stand over the ground for a season | Alpha-terthienyl released from the roots suppressed roughly half the nematode population in the University of Hawai'i trials | A row of marigolds along the bed edge is not the same intervention. The suppression comes from roots occupying the soil volume, so a border does a fraction of the work a preceding stand does |
| Spider mites: fine webbing in the leaf joints, bronzed leaves, worst in hot dry spells | Onions and garlic | Sulphurous emissions deter them at the margin of the bed | It will not touch the cause, which is heat, dust and dry air. Mulch and even watering do more than any neighbour |
| Whitefly: small white insects lifting off the undersides of leaves when you brush them | None, on the research cited here. Spacing and air movement | Whitefly numbers track still, humid air far more closely than they track what is planted alongside | No trial on this page supports a whitefly claim for any companion, and saying otherwise is where most companion charts stop being useful. Give each plant its own space in the row and water at soil level |
Sources: PubMed Central (companion basil primes the tomato wound response), University of Hawai'i (marigold cover cropping for nematode management), University of Minnesota Extension (companion planting in home gardens), Penn State Extension (culinary herbs and beneficial insects).
Two things hold across every row. A companion works on arrival rather than on occupation: it changes the odds that a pest settles in the first place and changes almost nothing once a colony is established. And the predators do more of the work than the repellents do, which is why letting three or four herbs flower beats planting more of anything, and why the flowers that actually bring ladybugs into a bed earn more space than most pest-repellent lists give them. Where a single pest is the whole problem, the targeted route goes deeper than one table row can: companion planting for tomato hornworm control covers the caterpillar everyone meets in July.
Just as some plants help tomatoes, others actively sabotage them. These incompatibilities are not guesswork — they involve documented allelopathic compounds, shared disease vulnerabilities, and competitive interactions that have been studied in controlled research. The same conflicts run through the rest of the vegetable garden, and the full map of which pairings to avoid covers crops beyond tomatoes.
Plants to Keep Away From Tomatoes
Fennel stunts the growth of all nightshade family members including tomatoes, peppers, and eggplants through allelopathic root secretions, which is why fennel and tomatoes do not mix in any arrangement. Brassicas (cabbage, broccoli, cauliflower, Brussels sprouts) also inhibit tomato growth, through the same allelopathy that puts walnuts off limits — keep them at least 55 inches (140 cm) apart or time them for different seasons. If the brassicas are the crop you care about, plan their bed around them instead and read up on what to plant with kale, what to grow next to cabbage and what to plant with Brussels sprouts. Potatoes share the same disease and pest vulnerabilities as tomatoes (both are nightshades) and should be separated to prevent tomato spotted wilt virus spread. Walnut trees release juglone — a toxin so potent it kills tomato plants outright within the tree's root zone, according to Virginia Tech Extension. Corn competes intensely for resources and shares certain pest susceptibilities.
| Plant to Avoid | Reason | Minimum Distance |
| Fennel | Allelopathic compounds stunt nightshade growth | Keep out of garden entirely |
| Brassicas (cabbage, broccoli) | Glucosinolate allelopathy inhibits tomatoes | 55+ in (140+ cm) |
| Potatoes | Shared diseases (blight, TSWV), same family | Separate beds recommended |
| Walnut trees | Juglone toxin kills nightshades | 50-80 ft (15-24 m) from trunk |
| Corn | Intense resource competition, shared pests | Separate areas of garden |
Sources: Virginia Tech Extension (walnut allelopathy), Vegetables Journal (brassica timing), UF/IFAS (tomato spotted wilt virus in peppers).
Peppers and tomatoes are planted together constantly and it usually works, but the reason it works is worth understanding, because the same logic rules potatoes out. Peppers, tomatoes, eggplants, tomatillos and potatoes are all in the nightshade family. They do not fight each other chemically. They share diseases.
Peppers: yes, with air movement. Early blight, septoria leaf spot and tomato spotted wilt virus all move between them, and all three travel further in still, humid air. Give each plant its own space in the row rather than tucking peppers into the gaps, and water at soil level so leaves stay dry. A mixed nightshade bed is also the natural place to put the rest of a salsa garden bed together.
Potatoes: no. The disease overlap is the same but the stakes are higher, because potato foliage carries late blight into a tomato bed and the tubers stay in the ground as a reservoir. Keep them in separate beds, not separate ends of one bed.
And do not follow one with another. The question people ask after a bad season is what happens if you plant tomatoes in the same spot every year. The answer is that soil-borne problems accumulate: verticillium and fusarium wilt, root-knot nematodes, and bacterial canker all persist in soil for years. Leave three years before any nightshade returns to the same ground, and count peppers, eggplants and potatoes as the same crop for that purpose. This is the single most common reason a tomato bed that worked for two seasons stops working in the third, and no companion plant fixes it.
Spacing is where most companion planting advice falls short — you get told what to plant but not where to put it. Here are the numbers that matter.
Tomato plants need 24 to 36 inches (60 to 90 cm) between individual plants and 48 to 60 inches (120 to 150 cm) between rows, according to standard vegetable spacing guidelines. That leaves plenty of room to tuck companions into the gaps. Shorter, faster-maturing plants like lettuce, carrots, and parsley can occupy the space between tomato plants without violating primary spacing needs.
Here is the number most guides miss: Texas A&M AgriLife Extension found that companion plants can still be beneficial up to 5 feet (1.5 m) away from tomato plants. The volatile compounds responsible for pest deterrence travel through the air — basil does not need to be touching the tomato stem to help it. This gives you much more flexibility in your layout than traditional close-proximity advice suggests.
For raised beds, the University of Minnesota Extension notes that companion planting is especially effective because "it allows tighter plantings and more variety with easy access for cultivation." A 4 x 4 foot (1.2 x 1.2 m) raised bed can comfortably hold 2 indeterminate tomato plants on supports, with basil at the corners, beans climbing the supports, and lettuce or carrots filling the floor space. For containers, an 18 inch (45 cm) deep pot can support one tomato with a basil plant and a few marigolds around the rim — which is exactly the kind of setup that works for our healthy soil guide recommendations.
This pairing turns up in the People Also Ask box on almost every tomato companion search, and the honest answer is that nothing chemical stops you. The problem is physical, and it is a problem on both sides.
A single zucchini plant covers 9 to 16 square feet (0.8 to 1.5 sq m) by midsummer and holds its leaves 2 to 3 feet (60 to 90 cm) up. Under that canopy, air stops moving, and still air is how powdery mildew gets established on the squash and how early blight gets going on the tomato's lower leaves. Both crops are also heavy feeders drawing on the same top 12 inches (30 cm) of soil.
If you only have one bed, keep 3 to 4 feet (90 to 120 cm) between them, put the squash on the downwind side so its leaves are not shading the tomato stems through the afternoon, and strip the tomato's lowest leaves to open the gap at soil level. Growing a vining variety up a frame instead of letting it sprawl solves most of it. Winter squash is easier to place than summer squash because it goes in once and runs away from the bed; fall harvest combinations for pumpkins covers that pattern.
Rather than memorizing a long list of companions, focus on building a simple layout that covers the key functional roles. Here is a step-by-step approach you can set up in one afternoon.
One thing to settle before step one: whether the bed is big enough to hold a companion plan at all. Two indeterminate tomatoes at 24 to 36 inches (60 to 90 cm) apart fill a 2 x 4 foot (60 x 120 cm) frame on their own, which leaves nowhere for the basil, the marigolds and the lettuce that make the plan work. A 4 x 4 foot (1.2 x 1.2 m) bed holds two tomatoes plus a full companion ring; a 4 x 8 (1.2 x 2.4 m) holds four. Depth matters less than footprint here, though 12 inches (30 cm) of soil is the point below which tomatoes start drying out between waterings. If the bed is the thing standing in the way, the raised bed sizes that fit a full companion layout are worth comparing before you plant. For an existing bed, a square-foot raised bed layout gets more companions into the same frame.
Place Your Tomatoes First
Space tomato plants 24 to 36 inches (60 to 90 cm) apart. Use cages, stakes, or trellises for indeterminate varieties. These are the anchors of your garden — everything else fits around them. Collar each stem as you plant if you have ever lost a transplant overnight, which is the signature of cutworms.
Add Basil on Both Sides
Plant one basil for every tomato, 12 to 18 inches (30 to 45 cm) away. This gives you the 1:1 row ratio that research shows produces the best combined yields. Harvest basil leaves regularly but let some plants flower for beneficial insects.
Ring the Edges With Marigolds
Plant French marigolds at the corners and margins of your bed. They suppress nematodes through their roots and attract pollinators through their flowers. Choose 'Single Gold' or other single-petal French varieties for best nematode control.
Fill the Floor With Low-Growing Companions
Tuck lettuce, spinach, or carrots into the spaces between tomato plants. These shallow-rooted crops draw water and nutrients from the top few inches of soil while tomato roots reach deeper — they share space without competing.
Add a Nitrogen Fixer
Plant bush beans or pole beans along the edges or train them up your tomato supports. They fix atmospheric nitrogen through bacteria in their root nodules, enriching the soil for your tomatoes and reducing your need for fertilizer.
Key Takeaway
You do not need to plant every possible companion — a tomato, a basil, a marigold, and a bean covers the four key functions (pest defence, nematode suppression, pollinator attraction, and nitrogen fixation). Start simple and expand as you get comfortable. Even two or three companions make a measurable difference.
Two conditions change the companion list rather than the plants themselves. Under glass or plastic there are no wind-borne pollinators and the air does not move, so basil mildews in the still air and the tomato flowers need shaking by hand; greenhouse crop pairings sets out what belongs in there with them. In a bed that gets less than six hours of direct sun, the tomato itself is the wrong anchor crop, and the honest move is to grow it in the sunniest spot you have and give the shaded bed to the vegetables that grow in shade. Variety matters here too: the indeterminate heirlooms that need the longest season are the least forgiving of either condition, which is covered under growing heirloom tomatoes.
The internet is full of companion planting advice that sounds reasonable but does not survive contact with research. Here are the biggest myths — and what the evidence actually says.
Myth: Basil improves tomato flavour. This is repeated everywhere, but Texas A&M AgriLife Extension is clear: "Basil has no connection to the taste of tomatoes." Double-blind taste tests over three years at West Virginia University showed "no consistent preference for tomatoes grown with companions over those grown in monoculture." The benefits of basil are real — they are just about pest defence and yield, not taste.
Myth: Marigolds repel Colorado potato beetles. The University of Minnesota Extension states plainly: "Multiple studies have shown this to be untrue." Marigolds do suppress nematodes and deter hornworm moths — but potato beetles are not on the list.
Myth: Companions must be planted right next to tomatoes. Texas A&M found benefits extend up to 5 feet (1.5 m) away. Volatile compounds travel through air, so cramming companions directly against tomato stems is unnecessary and can create competition.
Two neighbours worth planning around rather than squeezing in: cucumbers, which want the same feeding and the same airflow and so need their own trellis line, and the succession question of what to plant together in spring before the tomatoes go out at all, since the bed is empty and warming for six to eight weeks that most gardeners waste.
Myth: Epsom salt makes tomatoes produce more. This sits in the People Also Ask box on most tomato searches, so it is worth answering plainly: Epsom salt is magnesium sulphate, and it only does something if the soil is short of magnesium. Most garden soil is not. Where it genuinely gets misapplied is against blossom end rot, which is a calcium delivery problem driven by uneven watering, and magnesium competes with calcium for uptake, so the folk remedy can make the symptom worse. Full working: does Epsom salt help tomato plants, and the diagnostic route for blossom end rot and other deficiencies.
Myth: asparagus and tomatoes protect each other. The claim is that tomatoes repel asparagus beetle while asparagus repels root-knot nematodes, and it is repeated in almost every companion chart. The nematode half has some research behind it; the beetle half does not, and asparagus is a perennial bed that wants to be left alone for fifteen years while tomatoes want rotating every three. The rotation conflict is the real reason to keep them apart, and the asparagus and tomato claim is worth reading before you commit a permanent bed to it.
Myth: companions are a substitute for pest control. They reduce pressure, they do not remove it. A marigold border will not clear an established infestation, and the specific routes for how to get rid of whiteflies on tomatoes and keeping aphids off your vegetables still apply once numbers are up.
Why This Works: Observe and Interact
In permaculture, the first design principle is "Observe and Interact" — study what actually happens in your garden before making changes. The companion planting myths above persist because people repeat advice without observing results. The science-backed approach works better precisely because it is based on observed, measured outcomes rather than inherited assumptions. Your own garden will teach you which combinations work in your specific soil, climate, and pest environment — trust what you see, not just what you read.
Avoid planting fennel, brassicas (cabbage, broccoli, cauliflower), potatoes, and corn near tomatoes. Fennel and brassicas produce allelopathic compounds that stunt tomato growth. Potatoes share the same diseases, particularly late blight and tomato spotted wilt virus. Keep tomatoes well away from walnut trees — the juglone toxin released by walnut roots is lethal to nightshade family plants within the tree's drip line. Our companion planting chart has the full compatibility list.
Yes, cucumbers and tomatoes can grow together, though they are not the strongest companions. They share no allelopathic conflicts, and cucumbers can benefit from the trellis structures used for indeterminate tomatoes. The main concern is shared susceptibility to some fungal diseases, so ensure good air circulation with at least 24 inches (60 cm) between them and avoid overhead watering that keeps foliage wet.
Basil is the top choice — peer-reviewed research shows it primes tomato defence responses through volatile signalling and deters thrips, aphids, and hornworms. French marigolds repel hornworm moths through pyrethrum. Nasturtiums act as trap crops, attracting aphids to themselves instead of your tomatoes. For a broader approach, let dill, cilantro, and parsley flower to attract ladybugs and parasitic wasps that feed on tomato pests.
In a 4 x 4 foot (1.2 x 1.2 m) raised bed, plant 2 indeterminate tomatoes on supports, basil at the corners, French marigolds along the edges, and fill the floor with lettuce or carrots. Bush beans can go between the tomatoes. This covers pest defence, nematode control, pollinator attraction, and nitrogen fixation in a compact space. The University of Minnesota Extension specifically recommends raised beds for companion planting because they enable tighter, more diverse plantings.
French marigolds are the top recommendation due to their proven nematode-suppressing properties and hornworm moth deterrence. Nasturtiums serve as aphid trap crops. Calendula, cosmos, and zinnias attract pollinators and beneficial predatory insects including hoverflies and ladybugs. For maximum benefit, choose single-petal flower varieties over double-petal types — beneficial insects access nectar and pollen more easily from simple flower structures. The culinary herbs do the same job while earning their space in the kitchen: oregano spreads as a living mulch at the bed edge and parsley flowers in its second year for hoverflies, which are among the most effective aphid predators in a vegetable bed.
Get the Weekly Dig
One practical permaculture guide a week, written for gardeners who do this on weekends: companion pairings that hold up under scrutiny, and the ones that do not. Free, no spam, unsubscribe any time.
Join the newsletter