
Key Takeaways
Why Some Plants Keep Pests Away
Companion planting — the practice of growing certain plants alongside crops to discourage pest damage — has roots in traditional agriculture, and modern research has begun to clarify what actually works. Many aromatic herbs and flowering plants release volatile oils, alkaloids, or other compounds that interfere with how insects locate food and shelter. Others attract beneficial predators that keep pest populations in check.
The honest caveat: companion planting is not a replacement for good garden hygiene, healthy soil, or attentive monitoring. Think of it as a passive, low-cost layer of defense that complements other practices. If you're working toward a healthier growing environment overall, pairing companion planting with good soil nutrition from composting gives your plants the resilience to handle moderate pest pressure more easily.
Below are seven plants consistently cited in horticultural literature for pest-deterring properties — along with clear guidance on what they deter, how to use them, and where their limits lie.
Marigolds (Tagetes spp.)
French marigolds (Tagetes patula) are among the most studied companion plants. Their roots release a compound called alpha-terthienyl, which has been shown in research settings to suppress certain soil nematodes. Above ground, their strong scent is thought to confuse aphids and whiteflies trying to locate host plants.
Best use: Plant densely around tomatoes, peppers, and squash. Interplanting every few feet throughout a bed is more effective than a perimeter border alone.
Limits: Marigolds don't eliminate pests — they reduce pressure. Spider mites can actually thrive on marigolds, so monitor accordingly.
Marigold roots release compounds that suppress soil nematodes while their scent confuses above-ground pests.
Basil (Ocimum basilicum)
Basil's essential oils — particularly linalool and eugenol — are believed to repel thrips, aphids, and tomato hornworm moths. It's a natural pairing with tomatoes both culinarily and in the garden, and several small-scale studies suggest reduced aphid populations when basil is interplanted closely.
Best use: Plant basil 12–18 inches from tomato plants. Allow a few plants to flower; blooming basil attracts beneficial pollinators and predatory wasps.
Limits: Efficacy depends heavily on the density of planting and the pest species present. Basil alone won't stop a heavy aphid infestation.
Basil's essential oils may repel thrips and aphids when planted closely alongside tomatoes.
Lavender (Lavandula spp.)
Lavender's strong aromatic profile, driven by linalool and camphor compounds, is widely reported to deter fleas, moths, and some beetle species. It also draws in bees and parasitic wasps — beneficial insects that prey on common garden pests like caterpillars and aphids.
Best use: Plant along garden borders or near entrances to raised beds. Lavender is a perennial in most US growing zones (USDA zones 5–9), making it a long-term investment.
Limits: It's not effective against soil-borne pests and won't deter slugs or snails. Needs well-drained soil — waterlogged roots will kill the plant before it helps your garden.
Lavender attracts pest-hunting beneficial insects while its scent discourages moths and some beetles.
Nasturtiums (Tropaeolum majus)
Nasturtiums function differently from most companion plants: they work primarily as a trap crop. Aphids, particularly black bean aphids, are strongly attracted to nasturtiums and will colonize them preferentially — drawing pests away from nearby vegetables. This sacrificial role is well-documented among organic growers.
Best use: Plant at the edges of vegetable beds or in clusters near susceptible crops like beans and brassicas. Once aphids colonize the nasturtiums, you can remove the infested plants entirely or hose off the insects.
Limits: You need to monitor and manage the nasturtiums themselves, or the trap crop can become a pest reservoir that eventually spills over.
Nasturtiums lure aphids away from vegetables, acting as a sacrificial trap crop rather than a repellent.
Chives (Allium schoenoprasum)
Like other alliums, chives produce sulfur compounds that repel aphids, Japanese beetles, and carrot flies. They're compact, perennial in most US climates, and edible — making them one of the most practical additions to a kitchen garden.
Best use: Interplant with roses, carrots, or leafy greens. Chive flowers also attract pollinators when allowed to bloom in late spring.
Limits: Alliums can inhibit the growth of beans and peas — keep chives away from legume beds. Their sulfur compounds disperse quickly in wind, so effectiveness drops in exposed or windy sites.
Chives produce sulfur compounds that deter aphids and beetles, but should be kept away from bean plants.
Catnip (Nepeta cataria)
Catnip contains nepetalactone, a compound that research has found to repel mosquitoes and aphids, and may also deter squash bugs and Colorado potato beetles. Some studies suggest nepetalactone is as effective as DEET against certain mosquito species in controlled settings — though garden-level results are less dramatic.
Best use: Plant near squash, potatoes, and garden seating areas. Grow in pots if you want to limit spreading — catnip can become invasive in ideal conditions.
Limits: Attracts neighborhood cats, which may damage surrounding plants. Can spread aggressively; deadhead flowers before they set seed to keep it contained.
Catnip's nepetalactone compound repels mosquitoes and squash bugs but can spread aggressively if unmanaged.
Dill (Anethum graveolens)
Dill serves a dual role: it repels aphids and spider mites while simultaneously attracting beneficial insects — including lacewings, parasitic wasps, and hoverflies — that feed on common garden pests. It's particularly useful near brassicas and tomatoes early in the season.
Best use: Allow dill to flower to maximize its benefit to beneficial insects. Plant near cabbage, broccoli, and lettuce. Note that mature dill can inhibit tomato growth, so keep spacing to at least 18 inches from tomato plants.
Limits: Dill is an annual and bolts quickly in heat, so succession planting (staggering sowings every few weeks) extends its usefulness through the season. If you're cutting back plants at the wrong time, dill removed before flowering loses most of its beneficial-insect value.
Flowering dill attracts pest-hunting lacewings and parasitic wasps, making it a natural insectary plant.
Making Companion Planting Work in Your Yard
Positioning is the detail most gardeners overlook. Pest-deterring plants generally need to be within two to three feet of the crop they're protecting for volatile compounds to have a meaningful effect. A single marigold at the garden's edge won't shield a 20-foot row of tomatoes.
Start Small and Track Results
If you're new to companion planting, introduce two or three of these plants in one bed rather than overhauling your entire garden at once. Keep a simple garden journal noting where you placed companion plants and what pest activity you observed nearby. After a full season, you'll have personalized, reliable data to guide future decisions — far more useful than any general rule of thumb.
It also helps to think in terms of plant communities rather than isolated pairings. If you're already deciding between perennials and annuals for your landscape, consider weaving in a few pest-deterring species from each category — lavender and chives can return year after year, while marigolds and nasturtiums fill in annual gaps with minimal cost. Track what you plant and where each season, and note which pest problems seemed lighter near companion plants versus open beds. Over time, your own observations will be the most reliable guide to what works in your specific microclimate.
No companion plant is a silver bullet, and pest pressure will vary by region, season, and garden layout. Treat these plants as one informed, practical tool in a broader strategy — and enjoy the bonus that most of them are attractive, edible, or both.
