
The humble onion’s ability to deter common garden pests from other plants with its allium odor is a true blessing to anyone with a green thumb. This might tempt you to plant onions all over your garden like Oprah giving away freebies to the audience.
Vegetables like beets, spinach, lettuce, carrots, cabbage, tomatoes, peppers, eggplant, and even strawberries will thank you for planting onions nearby or interspersed in the row.
Yet other vegetables like peas, beans, asparagus, and a rich smorgasbord of herbs will hate you like poison for planting onions within a stone’s throw of them.
So, when you’re planning out your garden you need to account for the best and worst onion companion plants and why.
The Worst Onion Companion Plants

Sometimes the companion conflict between onions and other plantsis due to simple competition for resources. Other times it’s because the onions cause biochemical allelopathy, where their mere presence can inhibit the germination or stun the growth of another plant.
Asparagus

Asparagus is one of the worst things to companion plant with onions because both of them compete for the same soil nutrients. While we might eat the spears of asparagus, they are ultimately root vegetables with massive root systems that need all the nutrients and space they can get.
Onions are also a bad idea to plant with asparagus as pulling the onions when you harvest them can damage the shallow roots of the asparagus plant. It’s these roots that will eventually produce the spears you’ll eat next year or the years beyond.
Beans

Onions and beans despise each other because of the way they compete for resources, as well as the way onions affect the soil chemistry. Onions tend to kill or retard the rhizobium bacteria and other beneficial soil microbes that beans benefit from.
Pro Tip
I’ve had great success planting onion sets to be harvested as scallions after harvesting beans from the planting bed The excess nitrogen that the beans fix into the soil will help boost top growth on the scallions. It can be especially handy if you live in a northern growing region where you have limited time to get a proper scallion harvest.
Peas

As a legume, peas also suffer from stiff competition when planted with onions nearby. Snow peas in particular don’t like the onion’s ability to damage the beneficial soil bacteria they rely on for vigorous vining and pod production.
Just like beans you can succession plant scallion onions in a bed after harvesting peas. However, in my experience,the onions will affect the beneficial microbes in the soil so much that peas will still struggle to grow well the next year. So, it’s best to plant your next generation of peas elsewhere.
Other Alliums

Onions have a fierce sibling rivalry with other members of the Allium family, and shouldn’t be planted near garlic, shallots, or leeks. This is due to both how much resources an onion takes from the soil to grow a large bulb, as well as how its odor attracts pests that will attack other allium family members.
It also means you can’t plant onions in containers or raised beds with 15 to 20 feet of other alliums. Thrips, aphids, and other common allium pests will be drawn in by the onion’s odor, and then happily migrate to other family members.
The Best Companion Plants for Onions
The good news is that there are a lot of other plants like beets, broccoli, and lettuce, that love being companion planted with onions. Yet when we take a closer look at why they’re a good companion for onions, we get a better understanding of how to strategically plant and harvest them.
Beets

Beets love to be companions planted with onions because the allium odor they give off deters aphids, flea beetles, and even some animals who just love to munch on beet tops. The potential problem is that onions and beets are both root vegetables. If you plant them too close to each other or let them grow too long in the same proximity, they will start to compete for space and certain soil nutrients.
Pro Tip
My favorite way to companion plant beets and onions is to plant them for different harvest times. If I’m planning on an early summer harvest of baby beets, I companion plant them with onions I intend to grow all summer long into large bulbs. The baby beets get pulled and pickled long before there’s any space concerns with the swelling onions.
Then I also flip the strategy for beets that I plan to grow into large bulbs for a late summer harvest. In these beds I’ll plant onion sets a little deeper, harvesting them in early summer as scallions/green onions or pearl onion.
If I still have some onion sets left, I’ll plant them in mid-summer in a ring around the beet bed. This gives the beets the protection of onions, while also giving me a tasty fall crop of scallions.
Broccoli& Other Brassicas

Once again, the allium odor of companion-planted onions helps repel common pests that attack the brassica family of vegetables. It helps keep away cabbage loopers, cabbage worms, and flea beetles from most brassica family members like broccoli, cauliflower, and cabbage.
In my experience, onions don’t do that good of a job of repelling pests from Brussels sprouts. I suspect this is because the Brussels sprout plant grows too tall, and the allium odor at ground level simply isn’t potent enough to protect the upper leaves.
Lettuce & Leafy Greens

Onions are one of the best companions to plant with leafy greens like lettuce, mesclun greens, and even spinach. The odor of onions deters a lot of the pests that usually like to munch on lettuce and leafy greens. It can even disguise lettuce from a rabbit’s sense of smell.
At the same time, leafy greens tend to have very shallow root systems, whereas onions tend to grow deeper in the soil. They also draw out different nutrients, so there’s very little competition between the two.
Pro Tip
I like to plant lettuce and onions together when I’m growing the onions as scallions. Both tend to harvest at the same time in late spring to early summer. I eat my fill of them both in salads.
Then I let the last few onions grow into large bulbs. Selectively planting lettuce or other leafy greens for a tasty fall harvest.
Peppers

Onions and peppers don’t just go together on a cheesesteak sandwich or sausage roll. They’re also very beneficial when companion planted together. The odor of the onions does a great job of deterring common pepper pests like aphids. It’s an especially handy strategy if you’ve had known aphid infestations in the past.
The heavy foliage of pepper plants can also help shade the soil. This helps maintain the kind of soil moisture levels that the onions need to grow and maintain large bulbs.
Pro Tip
While peppers and onions don’t compete for the same primary resources, they both can be heavy feeders. This can leave your soil depleted of nitrogen, phosphorus, and micronutrients by the end of the season.
So, be sure to test your soil and amend it before planting any sort of heavy-feeding vegetable the next year. I will often plant peas and beans in the same soil the following spring to help boost the soil organically.
Tomatoes

The odor of onions in the air can disguise the presence of tomato plants from some of its common pests like aphids and hornworms. It’s just a happy coincidence that onions and tomatoes go well together in so many dishes.
The problem is that eventually, most indeterminate tomato plants will grow so tall that the allium odor of onions can no longer protect their upper leaves. So, this is a strategy that wanes over time.
Pro Tip
I like to container plant dill near tomatoes and onions. Not only does this provide a more vertical odor deterrent for the tomatoes, but many crawling tomato pests like hornworms will attack the dill before the tomatoes. You can then hand-pick them.
Just don’t plant mature dill in the same soil as tomatoes. When dill goes to seed it can become allelopathic to tomatoes.
Strawberries

Strawberries and onions have a mutually beneficial relationship when companion planted with each other. They both need strong amounts of phosphorus fertilizer to do their best in late spring into early summer. The straw mulch also helps maintain the consistent moisture levels the onions love.
At the same time, onion odor also helps repel a lot of common strawberry pests.
However, this relationship loses its luster as the season goes on. Once they strawberries stop producing fruit and send out propagating runners, onion bulbs start to get in the way. Then when you pull the bulbs, there’s a risk of damaging the tender roots of the fledgling strawberry plants.
Pro Tip
If I just want to harvest onions as scallions or green onions, I’ll intersperse them in the strawberry bed with at least 3 to 4 inches from the heart of the strawberry plant.
If I want the onions to grow to fully mature bulbs, I’ll plant them as a ring around the strawberry bed. Then I can pull them without worrying about damaging the roots.
Carrots

Companion planting onions with carrots is one of the best ways to prevent carrot fly problems. It’s a trick that also works with carrot’s kissing-cousin parsnips. The trick is not to plant the carrots and onions too close to each other. As root crops, pulling one can damage the roots of the other. It also helps to amend the soil in early spring with some time released phosphorus fertilizer.
This will give both carrots and onions the nutrients they need for strong root development while helping to reduce pest damage. Staggering their rows slightly will also make harvesting easier and prevent accidental root disturbance. With this combination, you’ll enjoy crisp, sweet carrots and plump onions, all while keeping carrot flies at bay.
Pro Tip
For maximum carrot fly protection, plant onions in staggered rows around your carrot bed, keeping at least 4 to 6 inches between rows. This creates a “scent barrier” that confuses pests while still allowing enough root space for both crops. Harvest onions first if they mature earlier—this opens up soil and light for the carrots to finish growing without root disturbance.

Written By
Amber Noyes
Amber Noyes was born and raised in a suburban California town, San Mateo. She holds a master’s degree in horticulture from the University of California as well as a BS in Biology from the University of San Francisco. With experience working on an organic farm, water conservation research, farmers’ markets, and plant nursery, she understands what makes plants thrive and how we can better understand the connection between microclimate and plant health. When she’s not on the land, Amber loves informing people of new ideas/things related to gardening, especially organic gardening, houseplants, and growing plants in a small space.