Vegetables grow well together when they share similar light and water needs while offering each other a specific benefit, such as tomatoes with basil for pest deterrence, corn with beans and squash for structure and nitrogen, and carrots with onions for pest confusion. The best pairings fall into four categories: pest control, pollinator support, space efficiency, and soil health.
What you will need
Pair Vegetables for Natural Pest Control
Tomatoes and basil are a classic pairing; basil's strong scent is believed to help confuse pests like aphids and hornworm moths that would otherwise easily locate tomato plants by smell, while also potentially improving tomato flavor when grown nearby.
Marigolds, planted near tomatoes, peppers, and other nightshades, release compounds through their roots that suppress root-knot nematodes in the soil, one of the better-documented companion planting benefits available to home gardeners.
Carrots and onions pair well since onions' strong sulfur scent helps mask the smell that attracts carrot rust flies, while nasturtiums planted near cucumbers and squash act as a trap crop, drawing aphids away from the main vegetable.
Strongly scented herbs like sage, thyme, and rosemary interplanted among cabbage-family crops can help disguise the scent cues cabbage moths use to locate their host plants, reducing cabbage worm pressure somewhat.
Pair Vegetables to Support Pollinators
Zinnias, cosmos, and borage planted near squash, cucumbers, melons, and other bee-pollinated crops help attract and support a stronger local pollinator population, directly improving fruit set on plants that rely on bees to move pollen between flowers.
Letting a few herbs like dill, cilantro, and fennel flower on purpose, rather than harvesting them entirely before they bloom, attracts beneficial predatory insects such as parasitic wasps and hoverflies, which help control aphid and caterpillar populations throughout the garden.
Sunflowers planted at the edges of a vegetable garden serve a dual purpose, providing a source of pollen and nectar for bees early in the season while also offering some wind protection and light structure for climbing plants like cucumbers.
Avoid spraying insecticides on or near flowering companions, even organic options, since doing so undermines the very pollinator support these plantings are meant to provide.
Pair Vegetables to Maximize Limited Space
Radishes planted between slower-growing carrots use space that would otherwise sit empty while the carrots mature, and are harvested and cleared out within a few weeks, well before they'd begin competing seriously with the carrots for room.
Lettuce grown in the light shade cast by taller crops like pole beans or trellised cucumbers takes advantage of a microclimate that would otherwise go unused, particularly valuable in hot climates where lettuce benefits from some relief from intense afternoon sun.
The Three Sisters method plants corn, pole beans, and squash together in the same space: corn provides a living trellis for beans to climb, beans fix nitrogen for the corn and squash, and squash's broad leaves shade the soil to suppress weeds, all from a single planting footprint.
Vining crops like cucumbers and small squash varieties trained up a trellis free up considerable ground space for lower-growing companions to be planted underneath or nearby, effectively adding a second usable layer to the same garden bed.
Pair Vegetables to Build Healthier Soil
Beans and peas host nitrogen-fixing bacteria in nodules on their roots, pulling nitrogen from the air and converting it into a form other plants can use; when their roots break down after harvest, that nitrogen becomes available to whatever grows nearby or afterward in the same soil.
Pairing heavy feeders like corn, tomatoes, and squash with nearby or subsequent legume plantings takes direct advantage of this natural soil enrichment, reducing the need for additional fertilizer in that section of the garden.
Deep-rooted plants like carrots and parsnips can help break up and aerate compacted soil layers, indirectly benefiting shallower-rooted companions planted in the same bed by improving overall soil structure and drainage.
Cover crops like clover, planted in a bed between vegetable seasons rather than alongside active crops, offer an even more concentrated version of this soil-building benefit, though this represents a rotational rather than a true companion planting strategy.
Know Which Pairings to Avoid
Beans and peas generally don't grow well near onions, garlic, or leeks, since compounds released by alliums can inhibit the growth and nitrogen-fixing ability of legume roots; keep these two families in separate sections of the garden.
Tomatoes and corn compete for many of the same soil nutrients and can attract the same pest, the corn earworm (also known as the tomato fruitworm), making it worth growing them in different areas to reduce the risk of a single pest outbreak affecting both crops.
Fennel is best grown alone, away from most vegetables, since it releases compounds from its roots that can suppress the growth of many neighboring plants, including tomatoes, beans, and peppers.
Potatoes and tomatoes, both nightshades, are best kept apart as well, since growing them near each other increases the risk of shared diseases like early and late blight spreading between the two crops.
Plan Your Layout Around These Pairings
Sketch your garden layout before planting, grouping companions from the categories above while also considering each group's shared sunlight and water needs, since even excellent pest-control or pollinator pairings can underperform if mismatched on basic growing requirements.
Prioritize pairings that address your garden's specific challenges; if pest pressure has been a recurring problem, lean into the pest-control pairings, while a garden with limited space might benefit more from the space-efficiency combinations.
Rotate companion groupings each year alongside your regular crop rotation, since repeating the exact same layout in the same spot every season allows pest and disease pressure to build up regardless of how beneficial the pairings themselves are.
Start with just a few proven pairings rather than trying to implement every possible combination at once, since a simpler plan you actually follow consistently tends to outperform an elaborate one that becomes too complicated to maintain.
Common problems and fixes
| Problem | Likely cause | What to do |
|---|---|---|
| Companion plants aren't reducing pest damage as expected | Pest pressure too high for companion planting alone, or plants not close enough together to be effective. | Plant companions within a foot or two of the target crop and combine with other pest control methods like row covers for heavier infestations. |
| One companion is outcompeting its neighbor | Mismatched growth rates or an aggressive spreading habit in one of the paired plants. | Choose companions with compatible growth speeds, or contain aggressive spreaders in their own pot even within a shared bed. |
Gardener's checklist
Test what you learned
What benefit do legumes like beans and peas provide to neighboring plants?
Answer: Nitrogen fixation, enriching the soil
Why should fennel generally be grown away from other vegetables?
Answer: It releases compounds that can suppress neighboring plant growth
What is a 'trap crop' in companion planting?
Answer: A plant used to lure pests away from the main crop
Common questions
What vegetables should never be planted together?
The most commonly cited incompatible pairing is beans and peas with onions, garlic, or leeks, since alliums can inhibit legume nitrogen fixation. Fennel is also best grown alone, and potatoes are best kept apart from tomatoes to reduce shared disease risk.
Do I need a lot of space to use companion planting?
No, many effective pairings, particularly the space-efficiency and pest-control categories, work well even in small gardens or raised beds, since the benefits come from proximity between just a couple of plants rather than requiring a large-scale layout.
Is companion planting scientifically proven?
Some companion planting benefits, like legume nitrogen fixation and trap cropping, are well-documented, while other traditional claims are less formally studied. Focusing on the better-documented pairings covered in this guide offers the most reliable results.
How close together should companion plants be to see a benefit?
Most companion effects, especially pest deterrence and trap cropping, work best within a foot or two of the target plant, since scent-based and physical interactions weaken significantly with distance.
The best vegetable pairings solve a specific problem, whether that's pests, pollination, space, or soil health, so start by identifying your garden's biggest challenge and choose companions that genuinely address it rather than trying to apply every pairing at once.
Frequently asked questions
How often should a vegetable garden be watered?
Frequency depends on weather, soil and plant size. Check the soil rather than watering on a rigid schedule.
Is compost enough fertilizer?
Compost improves soil and provides nutrients slowly. Heavy-feeding crops may still need additional feeding.