Companion Planting for Pest Control (2026)
Sarah Chen
· 8 min read
How Companion Planting Fights Pests
Companion planting isn’t mysticism or old-fashioned garden lore. It’s applied ecology. Plants interact with insects through volatile organic compounds (VOCs) — airborne chemicals that attract, repel, confuse, or poison different insect species. When you place the right plants next to each other, those chemical interactions reduce pest pressure across your whole garden.
There are four mechanisms at work:
Scent masking. Many pests find their host plants by smell. Basil planted near tomatoes releases estragole and citronellal, which overwhelm the chemical signals aphids and whitefly moths use to locate tomato plants. The pests don’t vanish, but fewer of them find your crop in the first place.
Trap cropping. Some plants attract pests more powerfully than your vegetables do. Nasturtiums pull aphids away from beans and cucumbers. Blue Hubbard squash draws squash vine borers away from zucchini and butternut. The trap crop sacrifices itself so your harvest survives.
Predator habitat. Dill, fennel, yarrow, and other umbel-flowered plants attract parasitic wasps, lacewings, and hoverflies — insects whose larvae devour aphids, caterpillars, and mites by the hundreds. These plants don’t repel pests directly. They recruit the predators that do.
Chemical warfare. Marigold roots release alpha-terthienyl, a compound directly toxic to root-knot nematodes in the soil. Chrysanthemums produce pyrethrin, a natural insecticide. These plants don’t just deter pests — they actively kill them through root and foliage chemistry.
Companion Planting Chart: Vegetables and Their Best Partners
| Crop | Best Companions | Pests Deterred | How It Works |
|---|---|---|---|
| Tomatoes | Basil, marigolds, borage | Aphids, whiteflies, hornworms | Scent masking + predator attraction |
| Squash/Zucchini | Nasturtiums, marigolds, radishes | Squash bugs, vine borers | Trap cropping + scent masking |
| Brassicas (kale, broccoli) | Dill, rosemary, thyme, chamomile | Cabbage moths, aphids | Scent masking + predator habitat |
| Beans | Rosemary, marigolds, summer savory | Bean beetles, aphids | Scent masking |
| Carrots | Rosemary, sage, leeks, chives | Carrot flies | Allium scent masks carrot foliage |
| Peppers | Basil, marigolds, petunias | Aphids, flea beetles | Scent masking + sticky traps (petunias) |
| Lettuce | Chives, garlic, tall plants for shade | Aphids, slugs | Allium repellent + environmental modification |
| Cucumbers | Dill, nasturtiums, sunflowers | Cucumber beetles, aphids | Predator habitat + trap cropping |
| Corn | Beans, squash (Three Sisters) | Multiple | Physical structure + ground cover |
The Five Most Effective Companion Plants
1. Marigolds — The Universal Defender
Newcastle University researchers confirmed that French marigolds (Tagetes patula) significantly reduced whitefly population development on nearby tomato plants. That’s just one confirmed benefit of many.
Marigold roots release alpha-terthienyl, which kills root-knot nematodes in the soil. Their foliage produces limonene and pyrethrin compounds that deter aphids, whiteflies, and cabbage moths above ground. They work both below and above the soil line, which is rare for a single companion plant.
How to use them: Plant marigold borders around every raised bed. Tuck individual plants between tomatoes, peppers, and squash. Use French marigolds specifically — they produce higher concentrations of pest-deterring compounds than African marigolds.
For more on marigolds and other pest-repelling plants, see our full guide to plants that repel bugs.
2. Basil — Tomato’s Best Friend
Basil and tomatoes aren’t just paired in the kitchen. Field trials showed that Holy Basil achieved 67% mosquito repellency, and common sweet basil’s estragole deters aphids, whiteflies, and tomato hornworm moths. When basil is interplanted with tomatoes, the aromatic compounds mask the scent cues that pests use to locate tomato foliage.
How to use it: Plant basil every 18-24 inches between tomato plants. Brush the leaves periodically to release volatile oils. Harvest regularly — actively growing basil produces more VOCs than mature, flowering plants.
3. Nasturtiums — The Trap Crop Champion
Nasturtiums work differently from most companions. Instead of repelling pests, they attract them. Aphids prefer nasturtiums over most vegetables, so planting nasturtiums on the garden edge pulls aphid colonies away from your crops.
How to use them: Plant nasturtiums 3-4 feet from vegetable beds, not between the vegetables. You want the aphids drawn to the border, not invited into the middle of your garden. Once nasturtiums are heavily infested, pull and dispose of them in sealed bags.
Bonus: nasturtium flowers and leaves are edible, with a peppery flavor that works in salads.
4. Dill — The Predator Recruiter
Dill’s umbrella-shaped flower clusters attract parasitic wasps, lacewings, and hoverflies — three of the most effective aphid predators in any garden. One parasitic wasp can parasitize dozens of aphids in its lifetime. A lacewing larva eats 200+ aphids before pupating.
How to use it: Let some dill plants go to flower. Most gardeners harvest dill for the kitchen before it blooms, missing the pest control benefit entirely. Keep a row specifically for flowering. Plant near brassicas (kale, broccoli, cauliflower) where cabbage aphids and caterpillars are the primary threats.
Caution: Keep dill away from carrots. They’re in the same family and can cross-pollinate, producing off-flavor seeds in both crops.
5. Chives and Garlic — The Allium Shield
Alliums (onions, garlic, chives, leeks) produce sulfur compounds that mask the scent of nearby plants and directly repel aphids, carrot flies, and Japanese beetles. Research has shown that garlic interplanting reduces aphid populations on lettuce and roses.
How to use them: Plant chive clumps at the ends of raised beds and around the base of rose bushes. Garlic can be interplanted between rows of carrots, lettuce, and brassicas. The sulfur compounds are released naturally and strengthened when leaves are bruised or cut.
Companion Planting Mistakes to Avoid
Planting fennel near vegetables. Fennel releases compounds that inhibit the growth of beans, tomatoes, and most garden vegetables. Plant fennel in its own isolated bed or in a container. It’s valuable for attracting beneficial insects but toxic to most neighbors.
Putting trap crops too close. Nasturtiums planted between your bean rows attract aphids into the garden instead of away from it. Position trap crops at the garden’s edge, at least 3-4 feet from the crops you’re protecting.
Ignoring below-ground effects. Companion planting isn’t just about what happens above the soil. Black walnut trees release juglone, which kills tomatoes, peppers, and eggplants within the root zone. Check for underground chemical interactions, especially near trees and established shrubs.
Expecting companion plants to work alone. Companion planting is a prevention layer, not a cure. When pest populations build despite good companion design, you need intervention. Insecticidal soap for active colonies, neem oil for systemic protection, and beneficial insect habitat all complement companion planting.
Monoculture rows of companions. A single row of marigolds along one edge doesn’t do much. Scatter companions throughout your beds. Interplant basil between every third tomato. Ring each raised bed with marigolds. The goal is to create overlapping spheres of chemical influence, not a decorative border.
Three-Season Companion Planting Calendar
Spring (March-May)
- Direct seed dill, nasturtiums, and calendula alongside early brassica transplants
- Plant chive divisions at bed ends and around perennial herbs
- Start basil indoors for transplanting next to tomatoes after last frost
- Sow radishes between squash hills as a trap crop for flea beetles
Summer (June-August)
- Interplant basil between established tomatoes and peppers
- Let dill flower to attract predatory insects during peak pest season
- Monitor nasturtium trap crops and remove heavily infested plants
- Tuck marigold transplants into any gaps in vegetable beds
Fall (September-November)
- Plant garlic cloves between bed rows for next season’s pest protection
- Leave some dill and fennel seed heads standing for overwintering beneficial insects
- Sow cover crops (clover, crimson clover) to provide predator habitat through winter
- Note which companion combinations worked best for next year’s garden plan
How Companion Planting Fits into Integrated Pest Management
Companion planting is the prevention layer in a broader pest management system. It reduces the number of pests that find your plants, but it won’t eliminate them entirely. When infestations break through, you need direct action.
Here’s how the layers stack:
- Companion planting reduces pest arrivals by 30-60% (prevention)
- Weekly monitoring catches problems early (pest identification guide)
- Physical removal handles small, localized colonies
- Insecticidal soap provides fast knockdown of active infestations
- Neem oil adds systemic protection between spray treatments
- Beneficial insects provide ongoing, free pest management
This layered approach — what professionals call integrated pest management — works better than any single strategy. Companion planting isn’t the whole answer. It’s the foundation that makes everything else work better.
Start with the chart above. Pick 2-3 companions for your most pest-prone crops. Track results through the season. You’ll likely see fewer infestations, smaller colonies, and more natural predator activity — all without spraying a single drop.
Frequently Asked Questions
Does companion planting actually work for pest control? ▼
Yes — research from Newcastle University confirmed that French marigolds significantly reduced whitefly populations on nearby tomato plants. Companion planting works through scent masking, trap cropping, and predator attraction. It's not a silver bullet, but it measurably reduces pest pressure when used as part of an integrated approach.
What is the best companion plant for tomatoes? ▼
Basil is the top companion for tomatoes. It repels aphids, whiteflies, and tomato hornworm moths through its estragole and citronellal compounds. Marigolds are a close second, providing whitefly deterrence and below-ground nematode control through root secretions.
What plants should not be planted together? ▼
Fennel inhibits growth of most garden vegetables and should be planted in isolation. Beans and alliums (onions, garlic) are antagonistic. Potatoes and tomatoes share blight diseases and shouldn't be adjacent. Brassicas and strawberries compete poorly when planted together.
Can companion planting replace pesticides? ▼
Companion planting reduces pest pressure but rarely eliminates it completely. Think of it as the prevention layer in integrated pest management. When infestations break through, you still need targeted treatments like insecticidal soap or neem oil. The benefit is needing those treatments less often.
✓ Certified Master Gardener (UC Davis Extension) with 12+ years of organic gardening experience. I test every recipe in my own half-acre homestead garden in Northern California before publishing. My goal is to help you protect your plants naturally — no harsh chemicals needed.
📚 Related Articles
learn15 Plants That Repel Bugs (Indoors & Outdoors) (2026)
These 15 plants repel mosquitoes, aphids, and flies naturally. Research-backed picks for indoors and outdoors — from marigolds to mint.
learnNatural Pest Control Methods That Actually Work (2026)
Proven natural pest control methods for gardens and homes. Insecticidal soap, beneficial insects, and companion planting — no synthetic chemicals needed.
learnIntegrated Pest Management for Beginners (2026)
Insecticidal soap is just one tool in your pest control toolkit. Learn the complete IPM approach that professional growers use to manage pests sustainably.