Companion Planting Chart: 20 Perfect Pairs for a Pest-Free Garden

Companion Planting Chart: 20 Perfect Pairs for a Pest-Free Garden | Elm Dirt Companion planting in a raised bed garden with vegetables and flowers growing together

By Elm Dirt | Organic Garden Tips | 10 min read

Here's something most gardeners don't realize until their second or third season: plants are social. Some of them genuinely like each other. And when you pair the right ones together, things get kind of magical—less pest pressure, better harvests, more pollinators showing up to help. It's not wishful thinking. It's just how plants work when you stop fighting nature and start working with it.

This guide has a printable companion planting chart with 20 of the best pairings I know of, plus real explanations for why they work. Because once you understand the "why," you can start making your own smart garden decisions—not just following a list.

Why Does Companion Planting Actually Work?

Okay, so it's not magic. (Sorry.) There are four real, science-backed ways companion plants help each other out. Once you understand these, the chart below makes a lot more sense.

Trap Cropping. Some plants basically volunteer to be pest bait—they're so attractive to bugs that they pull pests away from your vegetables. Nasturtiums are the classic example. Aphids love them. Which means the aphids leave your cucumbers alone. It's a little sneaky and a lot effective.

Natural Repellents. Certain plants release compounds through their roots, flowers, or leaves that bugs genuinely cannot stand. Marigolds push out something called thiophenes from their roots that actually kill soil nematodes. Garlic's sulfur compounds send a wide range of insects packing. You're essentially using plants as your pest control.

Attracting the Good Guys. This one's my favorite. Plants with small, open flowers—dill, fennel, yarrow—attract predatory wasps, hoverflies, and lacewings. Those insects then eat the bad bugs for you. Free pest control that renews itself. You don't have to do anything except plant the right things.

Soil Improvement. Beans and legumes pull nitrogen out of the air and fix it right into the soil, feeding their neighbors. Deep-rooted plants break up compaction and bring up minerals that shallower plants can't reach. Want to go deeper on how all of this ties together underground? Our guide on living soil and why microbes matter is a really good read.

The Companion Planting Chart (Save This One)

Quick note on how to use this: The "How It Helps" column tells you what the companion does for the plant next to it. The "Avoid" column is just as important—those combos can actually hurt your plants.
Plant Best Companion How It Helps Avoid Planting Near
Tomatoes Basil Basil deters aphids and hornworm; may improve tomato flavor Fennel, corn, brassicas
Tomatoes Marigolds Roots repel soil nematodes; flowers deter aphids and whitefly Fennel
Peppers Basil Confuses and repels aphids, spider mites, and thrips Fennel, apricots
Cucumbers Nasturtiums Trap crop—aphids prefer nasturtiums; also attracts pollinators Potatoes, sage
Cucumbers Dill Attracts beneficial predatory insects; repels spider mites Tomatoes (when mature)
Carrots Onions Onion scent repels carrot fly; carrots loosen soil for onion roots Dill, parsnips
Beans Corn Beans fix nitrogen that feeds corn; corn provides trellis support Onions, garlic, fennel
Squash Nasturtiums Trap crop for squash bugs and aphids; shade keeps soil moist Potatoes
Lettuce Tall Flowers (Cosmos) Shade reduces bolting in hot weather; cosmos attract pollinators Parsley, celery
Lettuce Chives Chive scent deters aphids and thrips that attack lettuce None significant
Broccoli Dill Attracts parasitic wasps that kill cabbage worms Tomatoes, peppers
Broccoli Marigolds Repels cabbage moth and aphids Grapes, strawberries
Garlic Roses Garlic sulfur compounds repel aphids and black spot on roses Peas, beans
Onions Chamomile Chamomile improves onion flavor and deters flies Beans, peas
Potatoes Horseradish Repels Colorado potato beetle when planted at corners of bed Tomatoes, fennel
Corn Squash Squash leaves shade soil, prevent weeds, retain moisture for corn Tomatoes
Strawberries Borage Attracts pollinators; borage is said to improve strawberry flavor Brassicas, fennel
Herbs (most) Dill & Fennel Attract hoverflies, lacewings, and parasitic wasps garden-wide Keep fennel isolated from most vegetables
Roses Lavender Deters aphids; attracts pollinators; repels deer and rabbits None significant
Flowers (beds) Yarrow Attracts ladybugs, hoverflies, and parasitic wasps None significant
Three sisters planting method with corn, squash and beans growing together

Let's Talk About the Good Stuff

The Three Sisters: Corn, Beans, and Squash

This one is thousands of years old. Native American farmers figured it out long before anyone was writing gardening books, and honestly? It still blows my mind every time. Corn grows tall and gives beans something to climb. Beans pull nitrogen right out of the air and put it into the soil—feeding the corn and squash for free. Squash sprawls out along the ground, shading out weeds and keeping moisture in the soil. All three are helping each other at the same time. It's like the most functional plant roommate situation you've ever seen.

Tomatoes and Basil

Look, even if this wasn't good for the garden, I'd still plant basil next to my tomatoes because then I'd have both things right there for a caprese salad. But it IS good for the garden. Basil's volatile oils—the stuff that makes it smell incredible—seem to deter aphids and repel tomato hornworm. There's also this long-running debate about whether basil improves tomato flavor. The science is fuzzy on that one (I'll be honest with you), but a lot of experienced gardeners swear by it. Either way, you've got fresh basil two feet from your tomatoes all summer. That's a win no matter what.

Marigolds: The Hardest Workers in the Garden

If you're only going to add one companion plant to your vegetable beds, make it French marigolds (Tagetes patula). Their roots release compounds called thiophenes that are actually toxic to root-knot nematodes—the soil pests that silently destroy vegetable roots all season. Their flowers also deter aphids and whiteflies above ground. Here's the thing though: you have to plant them in real numbers. A few sprinkled around randomly won't cut it. Create a dense border around your whole vegetable area and let them do their thing. They're also drop-dead gorgeous from June to frost, so it's not exactly a sacrifice.

Don't Overlook Your Herb Garden

Herbs are some of the best companion plants out there, and most people don't use them this way. (We have a whole guide on getting the most from your herb garden if you want to go deeper.) Here's the quick version:

Dill is fantastic—let some of it bolt and flower, and you'll have parasitic wasps and beneficial flies all over your garden. Cilantro does the same thing when it goes to seed, which most people try to prevent. Let it. Mint is a great aphid and ant deterrent, but you absolutely need to grow it in a container or it will take over your entire yard. I cannot stress this enough. Chives are low-maintenance and do a great job keeping aphids off roses and vegetables. Thyme and oregano sprawling as ground covers attract ground beetles that eat slugs and soil pests. Very underrated.

One big exception: fennel. Fennel is allelopathic—it puts out compounds that actively suppress the growth of most vegetables growing near it. Grow it, yes, because the flowers are incredible for beneficial insects. Just give it its own corner away from everything else.

Your Companion Plants Are Only as Good as Your Soil

Elm Dirt Ancient Soil organic living soil bag

Here's the honest truth: companion planting works way better in healthy, biologically active soil. If your soil is depleted, your plants won't have the resources to actually support each other. Our Ancient Soil and Worm Castings give you that rich, living foundation—packed with the beneficial microbes that make everything work the way it should.

⭐⭐⭐⭐⭐ 4.9/5 — "Everything grows better, faster and stronger."

Shop Ancient Soil →
⭐⭐⭐⭐⭐

"I have used Elm Dirt products in my 1st-time-ever raised bed garden boxes. I started mid May from 2" starter pots and I'm very pleased with the progress and the natural organic products I use."

— Anika D., Verified Buyer
⭐⭐⭐⭐⭐

"I have 2 raised garden enclosures where I plant tomatoes, cucumbers and green beans. This year I included worm castings. Produce should be super next summer."

— Dianne F., Verified Buyer
Permaculture garden with diverse companion planting

Combinations to Avoid (Seriously, Don't Do These)

Just as important as the good pairings—here are the ones that can actually hurt your garden.

⚠️ Fennel Near Basically Everything: I already mentioned this above, but it bears repeating. Fennel releases allelopathic compounds that suppress growth in most vegetables. It's not being dramatic—it will genuinely stunt your plants. Give it its own spot, far from your main beds.
⚠️ Beans and Onions (or Garlic): Onions and garlic are great companions for a lot of things, but they actively inhibit bean and pea growth. Keep these guys on opposite ends of the garden. They don't need to be anywhere near each other.
⚠️ Tomatoes and Potatoes Side by Side: Both are nightshades. Both get the same diseases—early blight, late blight. Planting them together is basically handing disease a shortcut to travel between two crops at once. Keep them separated.

How to Actually Put This Into Practice

The easiest way to get started? Think in layers and borders instead of trying to micromanage every single plant.

Put your taller plants—corn, sunflowers, staked tomatoes—on the north side of your beds so they don't shade out shorter crops. Run a thick border of marigolds around the whole vegetable area (not just a few here and there—commit to the border). Scatter some dill and cilantro throughout and let some of them bolt. Tuck basil in between tomatoes and peppers wherever it fits.

Then—and this is the part most people skip—actually feed the soil underneath all of it. Companion planting is a team effort. If the soil is dead, the team falls apart. Our Vegetable Garden Success Guide walks through this in more detail, and our post on building healthy soil is worth bookmarking.

Even with the best planning, some pests will still show up. (They always do.) Our guide on identifying common garden pests will help you figure out exactly what you're dealing with so you can respond correctly. And if you've got indoor plants too, we've got a separate guide on organic pest control for indoor plants because that's a whole different situation.

Common Questions

What is companion planting?

It's the practice of growing certain plants near each other because they actually help each other out—through pest deterrence, nutrient sharing, improved soil, or attracting the beneficial insects that protect your garden naturally.

What should you not plant next to tomatoes?

Fennel (it's toxic to most plants nearby), corn (shares the same earworm pest), brassicas like cabbage and broccoli (they compete hard for nitrogen), and potatoes (same disease family—they'll pass blight back and forth).

Do marigolds really keep pests away?

Yes, genuinely. French marigold roots release compounds that repel soil nematodes, and the flowers deter aphids and whiteflies. The catch is you need to plant them in a solid border, not just a few here and there scattered around. Numbers matter with marigolds.

What is the Three Sisters planting method?

A Native American farming technique that plants corn, beans, and squash together. Corn acts as a trellis for beans, beans fix nitrogen into the soil to feed everyone, and squash shades the ground to keep it moist and suppress weeds. Three plants helping each other simultaneously. It genuinely works.

Can companion planting replace pesticides?

For a lot of home gardeners—yes, or very close to it. Combined with healthy living soil and the occasional targeted organic spray for stubborn pests, companion planting can dramatically cut down on (or eliminate) synthetic chemicals. It works best as part of a whole-garden organic approach, not a standalone fix.

Feed the Soil That Makes All of This Work

Great companion planting starts underground. Give your plants the rich, living soil they need to actually support each other—and watch what happens.

Shop Worm Castings Shop Ancient Soil
Back to blog