Home Blog Companion Planting Guide

Companion Planting Pest Control

Companion Planting Guide: Which Vegetables Grow Well Together

Some plants help each other grow. Others compete, attract pests, or release compounds that stunt their neighbors. This guide covers what companion planting actually is, the pairs that work, and the combinations to avoid.

Niwa Gardening Guide

Companion Planting · 9 min read

What is companion planting?

Companion planting is the practice of growing different plants near each other to create mutual benefits. It's one of the oldest gardening techniques in the world — and one of the most misunderstood.

Done well, companion planting can: deter pests naturally without chemicals, attract beneficial insects and pollinators, improve soil nitrogen levels, maximize space, and boost flavor or yield of neighboring crops.

Done poorly — or based on folklore rather than evidence — it does nothing, or occasionally causes harm by creating competition for nutrients, water, or light.

The most important rule: Get the basics right first. Sun, soil, water, and spacing matter far more than companion planting. Think of companions as a bonus layer — not a replacement for good growing conditions.

How companion planting actually works

There are four main mechanisms that explain why certain plant pairings work:

1. Pest deterrence through scent

Strongly scented plants like basil, garlic, and marigolds confuse or repel insects that navigate by smell. Aphids and whiteflies, for example, have a much harder time finding tomato plants when basil is planted nearby — the competing scent disrupts their ability to locate their host.

2. Attracting beneficial insects

Flowers like marigolds, nasturtiums, dill, and borage attract predatory insects — ladybugs, lacewings, hoverflies — that eat the pests damaging your crops. They also attract pollinators, which increases fruit set in crops like beans, cucumbers, and tomatoes.

3. Soil improvement through nitrogen fixation

Legumes (beans and peas) have a symbiotic relationship with bacteria in the soil that converts atmospheric nitrogen into a form plants can use. Growing legumes near heavy feeders like corn or brassicas gradually improves soil fertility for the neighboring plants.

4. Physical complementarity

The classic example is the Three Sisters — corn, beans, and squash — grown together by Indigenous farmers across the Americas. Corn provides a pole for beans to climb. Beans fix nitrogen in the soil. Squash shades the ground, retaining moisture and suppressing weeds. Three crops, each making the others more productive.

The 5 companion planting pairs every gardener should know

Tomato + Basil

The most cited companion pair in gardening. Basil is believed to repel thrips, aphids, and whiteflies — all common tomato pests. Some gardeners also report improved tomato flavor near basil, though this is harder to measure scientifically. They also share similar growing conditions: full sun, warm temperatures, consistent water. Easy to plant, easy to harvest together.

Carrot + Onion (or Leek)

Carrot fly and onion fly are both serious garden pests. Carrot fly is deterred by the scent of onions; onion fly is deterred by the scent of carrots. Growing them in alternating rows or in nearby squares confuses both pests. This is one of the more well-supported companion planting combinations in garden research.

Brassicas + Nasturtium

Nasturtiums act as a trap crop for aphids — aphids are so strongly attracted to them that they colonize the nasturtium and leave your cabbage, broccoli, and kale relatively undisturbed. Plant nasturtiums at the edge of your bed or interspersed throughout. As a bonus, nasturtium flowers are edible and add a peppery kick to salads.

Corn + Beans + Squash (Three Sisters)

This combination has been used for thousands of years. Corn provides vertical support for pole beans. Beans fix atmospheric nitrogen and feed the heavy-feeding corn. Squash covers the ground, retaining moisture and preventing weeds from competing. Together, they produce more per square foot than any of the three crops grown separately.

Any vegetable + Marigold

French marigolds (Tagetes patula) are probably the single most useful companion plant in the vegetable garden. They repel nematodes in the soil, deter aphids and whiteflies, and attract beneficial insects. Research has confirmed that marigolds planted near tomatoes and peppers reduce whitefly populations measurably. Plant them throughout your beds, not just at the borders.

Companion planting combinations to avoid

Fennel + Almost everything

Fennel releases allelopathic compounds from its roots that inhibit the germination and growth of most other vegetables. It is particularly harmful to tomatoes, peppers, bush beans, and kohlrabi. Grow fennel in a separate container or in a dedicated bed away from your main vegetable garden. It's one of the few plants that is genuinely bad to have near others.

Onion + Beans or Peas

Onions, garlic, leeks, and other alliums inhibit the growth of beans and peas when planted nearby. The exact mechanism isn't fully understood, but it's one of the most consistently observed incompatible pairings in gardening — keep them well separated in your bed layout.

Brassicas + Tomatoes

Brassicas (cabbage, broccoli, kale, cauliflower) compete heavily with tomatoes for nutrients and are said to inhibit each other's growth. They also attract completely different pest sets, meaning you'd need conflicting deterrent plants nearby. Keep nightshades and brassicas in separate beds where possible.

Mint + Everything (in the ground)

Mint is an aggressive spreader. Left unchecked in a bed, it will colonize every available square foot and crowd out nearby crops. Mint belongs in a container — where it's excellent at deterring aphids and other pests when placed near the bed, without taking over.

The complete companion planting chart

Use this chart as a reference when planning your garden layout. The "good companions" are plants known to benefit each other when grown nearby. The "avoid" column lists combinations that compete or inhibit growth.

Plant Good companions Avoid
TomatoBasil, marigold, carrot, parsley, borageFennel, brassicas, corn
PepperBasil, tomato, carrot, marigoldFennel, kohlrabi
CucumberBeans, peas, radish, marigold, nasturtium, dillSage, potato, aromatic herbs
Zucchini / SquashCorn, beans, nasturtium, boragePotato
CarrotOnion, leek, lettuce, rosemary, sage, tomatoDill (when mature), fennel
LettuceCarrot, radish, strawberry, chives, garlicCelery, parsley
SpinachStrawberry, peas, beans, celeryNone known
Beans (bush)Carrot, cucumber, peas, squash, strawberry, marigoldOnion, garlic, fennel, pepper
PeasCarrot, corn, cucumber, beans, radish, spinachOnion, garlic, leek
Onion / GarlicCarrot, beet, lettuce, chamomile, tomatoBeans, peas, sage
Broccoli / CabbageDill, celery, onion, potato, nasturtium, rosemaryTomato, pepper, strawberry, fennel
KaleBeet, celery, herb, nasturtiumTomato, bean, strawberry
CornBeans, squash, cucumber, sunflower, melonTomato, fennel
RadishCarrot, lettuce, spinach, cucumber, peasHyssop
StrawberryLettuce, spinach, thyme, sage, beansBrassicas, fennel
BasilTomato, pepper, asparagus, oreganoSage, thyme
DillCabbage, lettuce, cucumber, onion, cornCarrot (mature dill), tomato, fennel
MarigoldEverything — plant throughout the bedNothing known
NasturtiumBrassicas, cucumber, squash, tomatoNothing known
FennelGrow alone or with dill onlyAlmost everything

Herbs as companion plants

Herbs are some of the most useful companion plants in the vegetable garden. Most have strong scents that deter pests, and many also attract beneficial insects.

Basil

Plant near tomatoes and peppers. Repels aphids, thrips, and whiteflies. Pinch flowers regularly to keep the plant producing leaves — and to keep pest-deterring volatile compounds at peak concentration.

Rosemary

Strong scent deters cabbage moths, bean beetles, and carrot flies. Plant near brassicas and carrots. Drought tolerant — don't overwater it near crops that need more moisture.

Dill

Attracts predatory insects like wasps and lacewings that eat aphids and caterpillars. Plant near brassicas and cucumbers. Avoid planting near tomatoes or near mature carrots, as it can compete.

Borage

One of the best all-around companion plants. Attracts pollinators and predatory insects. Improves the flavor and growth of strawberries and tomatoes when planted nearby. Edible flowers are a bonus.

Chives

Repel aphids, Japanese beetles, and carrot flies. Plant near roses, carrots, and tomatoes. Easy to grow and mostly perennial — plant once and they return every year.

How to plan companion planting in your garden layout

The most effective way to use companion planting is to integrate it into your garden layout from the start — not as an afterthought after everything is already planted.

When you're mapping your beds, think about which crops you're planting in each square and which companions would help them. A few principles to follow:

See companion planting in your garden plan: Niwa shows you companion planting information for every plant in its library. When you add a plant to your garden layout, you can see which plants are good and bad neighbors — directly in the app. Download free →

What companion planting can't do

Companion planting won't eliminate pests or fix a garden that lacks good soil, sun, or water. It's a supplemental strategy — one layer of a healthy growing system.

Also worth noting: much companion planting advice on the internet is based on folklore rather than controlled research. The pairings in this guide are those with the most consistent evidence behind them, either from scientific studies or from very well-documented gardening practice. When you see claims about exotic companion effects without any explanation of the mechanism — be skeptical.

The basics are real and worth practicing. Marigolds repel nematodes. Nasturtiums trap aphids. Legumes fix nitrogen. Strongly scented herbs deter pest insects. Start there, and build from experience in your own garden.

Plan companion planting visually on your iPhone

Niwa shows companion planting information for every plant in its library. Add a crop to your garden layout and instantly see which plants are good and bad neighbors. Free to download.

5.0 on App Store

More gardening guides