Plant These 7 Companions in Your Raised Bed for Fewer Pests and Higher Yields
7 companion plants for your raised bed — including sweet alyssum, which Purdue trials showed cuts aphid pressure to near zero. With prices from $2.99.
Most raised bed guides tell you what to plant together. Almost none explain why it works at a biological level — or why identical pairings produce dramatically different results depending on spacing, timing, and bed size. That gap is why companion planting either transforms your raised bed or quietly underperforms.
Companion planting works through three distinct mechanisms: odor masking, predator attraction, and trap cropping. When you match the right mechanism to the right pest problem, you get measurable results. When you don’t, you get a pretty border and the same aphid damage as last year.

This guide covers seven companions with the strongest evidence behind them, specific raised bed spacing recommendations, and where to buy each one. It also names one widely repeated companion planting claim that research has actively disproven.
How Companion Planting Works — and When It Doesn’t
University of Minnesota Extension identifies three mechanisms that explain most proven companion planting results.
Seasonal Garden Calendar
Know exactly what to plant, prune and sow — every month of the year.
Odor masking is the most studied. Aromatic plants release volatile organic compounds (VOCs) — including alpha-pinene, camphor, and isothiocyanates — that blend with your crop’s chemical signature. Aphids and other pests locate their host plants by detecting specific volatile blends. When aromatic companions alter those proportions, the pest’s chemical navigation system fails: the host plant effectively disappears from its sensory map. A 2018 analysis published in PMC confirms this mechanism and identifies the key compounds responsible. The critical detail: density matters. Spacing aromatic companions 6–8 feet apart in a field produces weak VOC concentration. In a 4×4 raised bed, two or three aromatic plants create the concentrated volatile cloud needed for the effect to register.
Predator attraction works differently. Plants like sweet alyssum and dill produce nectar that feeds parasitoid wasps and syrphid flies — insects that spend their adult lives hunting and parasitizing pests. You’re not repelling the pest; you’re recruiting its predator.
Trap cropping pulls pests away from your primary crop onto a sacrificial plant where they’re easier to manage. Nasturtium is the most practical example for raised bed gardeners.
One important correction: marigolds deterring Colorado potato beetles is a myth. Multiple studies cited by UMN Extension have actively disproven it. Marigolds do work against nematodes and certain above-ground pests — but not potato beetles. Knowing what a companion doesn’t do is as useful as knowing what it does.
For a deeper dive into which vegetables help each other — and which actively compete — see our full companion planting guide for vegetables.

The 7 Best Companion Plants for Raised Beds
1. French Marigold — The Nematode Fighter
Best for: Beds with tomatoes, peppers, and beans, especially in soil with a history of root damage or poor drainage.
French marigolds (Tagetes patula) release thiophene compounds from their roots — compounds that repel soil-dwelling nematodes. According to ATTRA’s companion planting resource guide, this nematode-suppression effect is real, though it requires dense planting over a full growing season to build up in the soil. One ring of marigolds around a single tomato plant won’t cut it; filling an entire bed edge row and leaving the roots to decompose over winter is how you build suppression for the following season.
Above ground, marigold scent deters deer and rabbits and contributes to the VOC masking effect for aphids and whitefly. Illinois Extension notes that some ladybug species, attracted to marigold-rich beds, consume up to 50 aphids per day.




Raised bed tip: Plant one marigold per 12 inches along the bed’s outer edge. In a 4×4 bed, 6–8 border plants provide both nematode suppression and scent-based deterrence.
Buy: Sow Right Seeds French Marigold — $3.49/packet
2. Sweet Alyssum — The Banker Plant
Best for: Any bed with aphid pressure — brassicas, lettuce, strawberries, and tomatoes benefit most.
Sweet alyssum (Lobularia maritima) belongs to the mustard family, and its pungent-sweet fragrance acts as a chemical beacon for parasitoid wasps and syrphid flies. The mechanism: these insects need carbohydrate-rich nectar to fuel their search for prey. Alyssum’s continuous bloom provides that fuel, keeping beneficial insects resident in your bed rather than wandering off to find food elsewhere.
Syrphid fly larvae are particularly effective. A single larva can consume 400 aphids before pupating. Purdue University’s high tunnel trials documented the practical result: strawberry plants growing alongside sweet alyssum had almost no aphid pressure, while strawberries grown alone showed significant infestation. I’ve seen this play out in my own raised beds — within a couple of weeks of sweet alyssum coming into flower, the hoverfly activity around my brassicas noticeably picks up, and aphid colonies that would normally build through June stay suppressed.
As a bonus, flies are the second most important pollinator group after bees — particularly important for strawberry fruit set. Alyssum’s 90-day bloom window means this recruitment effect lasts most of the growing season.
Raised bed tip: Scatter seeds in gaps between transplants rather than in dedicated rows. The plant fills space without competing aggressively and self-thins as crops shade it. Matures in 56–63 days.
Buy: True Leaf Market Alyssum Royal Carpet — $2.99/500mg (non-GMO, AAS award winner)
3. Nasturtium — The Trap Crop
Best for: Squash, cucumbers, brassicas, and beans — particularly if aphids, cabbage whites, or squash bugs are recurring problems.
Nasturtium (Tropaeolum majus) works through trap cropping: pests prefer it to your primary crops, concentrating their population in one predictable location. University of Minnesota Extension research confirms nasturtium’s effectiveness against squash bug populations; when paired with French marigolds, the combination reduced both squash bug and cucumber beetle damage in trial plots.
The trap cropping mechanism is only useful if you act on it. Once you see aphid clusters on nasturtium leaves, you can remove and dispose of infested stems, apply targeted spray, or simply leave them as a sacrificial colony that keeps pests off your vegetables.
Nasturtium also earns its space in two other ways: the flowers and leaves are edible (peppery, like arugula) and the blooms attract pollinators including hummingbirds and honeybees.
Raised bed tip: Plant at corners or along one edge. The Jewel Mix grows 18–24 inches and stays compact enough for raised bed use. Deadhead regularly — nasturtium self-seeds prolifically and will take over a small bed if you let it go to seed.
Buy: True Leaf Market Nasturtium Jewel Mix — $2.99/5g (organic, ~225 seeds/oz, 54–63 days)
4. Borage — The Pollinator Magnet
Best for: Tomatoes, squash, strawberries, and any fruiting crop that needs consistent pollination.
Borage (Borago officinalis) produces star-shaped blue flowers continuously from midsummer through frost, providing nectar that keeps bees and hoverflies returning to your bed repeatedly. Clemson Cooperative Extension identifies borage alongside calendula and zinnia as among the best pollinator-attracting companions for fruiting vegetables. For squash and zucchini — crops that abort fruit when pollination is incomplete — a single borage plant near the bed can meaningfully improve fruit set.
Community gardeners also report that borage deters tomato hornworm, though no peer-reviewed studies confirm this directly. Treat it as a plausible benefit rather than a guaranteed one. What is confirmed: the pollination boost is real and measurable.
Borage flowers are edible (cucumber flavor) and make an attractive garnish. The plant is heat-tolerant and handles drought better than most companion flowers, making it reliable in the mid-to-late season when other companions may fade.
Raised bed tip: One plant per 4×4 bed. Borage spreads to 2–3 feet wide, so position it in a corner to avoid shading smaller crops. It self-seeds — flag seedlings in fall so you don’t accidentally pull them in spring.
Buy: True Leaf Market Borage — $2.99/2g packet (non-GMO, heirloom, heat tolerant)
5. Dill — The Parasitoid Wasp Host
Best for: Brassicas, tomatoes, and cucumbers — particularly when caterpillar pressure (cabbage looper, hornworm) is a recurring problem.
Dill (Anethum graveolens) belongs to the Apiaceae family, whose distinctive umbrella-shaped flower clusters provide a nectar source for tiny parasitoid wasps (Braconidae and Ichneumonidae families). These wasps lay eggs inside caterpillars; the larvae develop inside the host and kill it. The wasp is harmless to humans and invisible to most gardeners, but it’s one of the most effective natural pest control tools available. The only requirement: you have to provide the adult wasps with nectar to sustain them between parasitizing events. Dill does that.
University of Minnesota Extension notes that thyme and dill both showed measurable effectiveness in reducing cabbage looper and diamondback moth populations on brassicas when grown in close proximity.
Two important caveats: Keep dill away from carrots — they cross-pollinate and dill can stunt carrot growth. Keep fennel away from everything — it releases allelopathic compounds that suppress most vegetables. Dill is not fennel’s replacement; they’re both problematic neighbors if not managed.
Raised bed tip: Plant dill at the end of the bed farthest from any carrots. Cut flower heads before full seed drop to prevent aggressive self-seeding and to keep plants in the vegetative (leaf-producing) stage longer.
Buy: Sow Right Seeds Dill — $3.49/packet (non-GMO heirloom, 650 seeds, zones 2–11)
6. Basil — The VOC Masker
Best for: Tomatoes and peppers. Close-planted basil contributes to VOC masking for both aphids and thrips.
University of Minnesota Extension field and greenhouse trials found that basil combined with marigolds reduced thrip populations on tomato plants. Basil’s aromatic oils — linalool, eugenol, and methyl chavicol — contribute to the mixed volatile cloud that disrupts pest host-finding behavior described in the mechanisms section above.
One popular claim worth correcting: basil does not improve tomato flavor. A three-year double-blind taste test at West Virginia University found no measurable flavor difference in tomatoes grown with or without basil. The real benefit is pest deterrence, not flavoring. Growing them together still makes sense — just for the right reason.
Raised bed tip: One basil plant per 2–3 tomato plants. Pinch off flower buds as they form — flowering triggers a drop in aromatic oil production, which is exactly what you want to avoid when using basil as a pest deterrent.
Buy: Sweet basil seeds are available at most garden centers for $3–4 per packet. Most gardeners start with a nursery transplant ($2–3) for a quicker start.
7. Pole Beans — The Nitrogen Fixer
Best for: Beds that will grow corn, squash, brassicas, or other nitrogen-hungry crops. Best deployed in a multi-season rotation strategy.
Beans form a symbiotic relationship with Rhizobium bacteria in the soil. The bacteria colonize the root nodules and fix atmospheric nitrogen into ammonia — a form plants can use. The critical timing note: neighboring plants only receive that nitrogen when bean roots and plant matter decompose. You don’t get nitrogen transfer during the growing season from a living bean plant. The payoff comes when you mow the bean plants at season’s end and leave the residue in the bed to break down over winter.
In raised beds, the classic Three Sisters system (corn, beans, squash) requires a minimum 4×8-foot bed to give corn stalks enough proximity for wind pollination. In a 4×4 bed, skip the corn and grow beans up a trellis alongside squash instead — you still get nitrogen fixation and squash’s weed-suppressing canopy.
Raised bed tip: Plant pole beans along a trellis on the north side of the bed so they don’t shade other crops. At season’s end, cut plants at soil level rather than pulling — leave the nitrogen-rich root nodules in the soil to decompose.
Buy: Bush and pole bean seeds are available at any garden center, $3–5 per packet. Most gardeners already have beans in their plan; this entry is a reminder to treat them as nitrogen-building companions, not just a food crop.
Top 5 Companion Picks at a Glance
| Product | Best For | Price |
|---|---|---|
| Nasturtium Jewel Mix (True Leaf Market) | Trap crop for squash, cucumbers, brassicas | $2.99/5g |
| French Marigold (Sow Right Seeds) | Nematode suppression + soil-borne pest deterrence | $3.49/packet |
| Alyssum Royal Carpet (True Leaf Market) | Aphid control via parasitoid wasps + syrphid flies | $2.99/500mg |
| Borage Herb Seed (True Leaf Market) | Pollination boost for tomatoes and squash | $2.99/2g |
| Dill Seeds (Sow Right Seeds) | Parasitoid wasp habitat for brassicas and tomatoes | $3.49/packet |
4 Rules That Make Raised Bed Companion Planting Work
Raised beds change the math on companion planting compared to field-scale recommendations.
Rule 1: Density over distance. Field recommendations often space aromatic companions 18–24 inches apart in rows. In a 4×4 raised bed, plant aromatic companions every 8–12 inches along the bed edge. The confined space concentrates VOCs. One or two plants won’t produce enough volatile output to mask a full bed of host crops.
Rule 2: Time your bloom to pest season. Sweet alyssum and marigolds need to be in flower before aphid populations peak in your area. If your last frost date is mid-April, start seeds indoors 4–6 weeks earlier, or buy transplants that are already budding. A companion that blooms two weeks after peak pest pressure is too late to recruit the predators you need.
Rule 3: Match the companion to the crop’s main pest. Don’t plant nasturtium hoping it will help with nematodes — use marigolds for that. Don’t use borage to fight caterpillars — plant dill instead. Each companion has a primary mechanism and a primary pest it addresses. Match them specifically rather than scattering companions at random and hoping something works.
Rule 4: Know the antagonists. Fennel is allelopathic — it releases root compounds that suppress most vegetables. Never plant it in or adjacent to a raised bed with food crops. Alliums (onions, garlic, chives) suppress beans and peas; keep them on opposite sides of the bed. Corn and tomatoes share the corn earworm as a pest — growing them side by side amplifies the problem rather than distributing it.
For more on structuring your raised beds for maximum productivity, see our raised bed gardening guide.

Frequently Asked Questions
Does companion planting actually work?
Yes — but not all companion planting claims are equal. The three mechanisms described above (VOC masking, predator attraction, trap cropping) have solid peer-reviewed support. Some claims, like marigolds deterring Colorado potato beetles, have been actively disproven. Focus on companions with a described mechanism and at least one research citation. The ones in this guide qualify.
How many companion plants do I need per raised bed?
For a 4×4 bed, 3–4 well-placed companion plants (typically along the edges or corners) provide meaningful coverage. For VOC masking to work, aim for one aromatic companion per 2–3 primary plants. For banker plant recruitment (sweet alyssum), even one established plant in flower makes a measurable difference based on Purdue’s trial data.
Can I grow companion plants in a small raised bed?
The smaller the bed, the better aromatic companions tend to work. VOC concentration is higher in a defined space than in open field conditions. A 4×4 raised bed is actually ideal — the physical boundary keeps companion volatiles concentrated around your crops rather than dissipating across open ground.
Sources
- Kessler, A. & Kalske, A. (2018). “Volatile Terpenes and Chemical Ecology of Harmful and Beneficial Insect Interactions in Crop Systems.” Agronomy. PMC5746795
- Diver, S. & Hinman, T. “Companion Planting and Botanical Pesticides: Concepts and Resources.” ATTRA/NCAT. attra.ncat.org
- “Companion Planting in Home Gardens.” University of Minnesota Extension. extension.umn.edu
- “Plant Partners: 5 Benefits of Companion Planting.” Clemson Cooperative Extension HGIC. hgic.clemson.edu
- Obermeyer, J. “Observations on the Companion Plant: Sweet Alyssum.” Purdue University Vegetable Crops Hotline. vegcropshotline.org
- “Fortify the Spring Vegetable Garden with Marigolds, Sweet Alyssum, and Nasturtiums.” Illinois Extension / UIUC. extension.illinois.edu








