What to Grow with Onions | And What Not to Grow with It
The onion’s most useful characteristic as a companion plant is its scent. The volatile sulphur compounds alliums produce continuously through the growing season mask the chemical signals that certain pests use to locate their target crops.
Carrot fly finds carrots by following those signals. Onion fly finds onions the same way. Grow them beside each other, and each masks the other’s signal, making both harder for their respective pests to locate.
That’s the most clearly documented companion relationship in this guide – and it’s a good starting point for understanding how onions work in a companion planting system.
The same compounds that make onions useful neighbours for some crops make them actively harmful to others. Legumes, beans, and peas – fix nitrogen through bacteria in their roots, and allium compounds inhibit those bacteria.
Onions and legumes should not share growing space. Understanding both sides of that dynamic – who benefits and who doesn’t- is what makes companion planting with onions practical rather than guesswork.
How onions work as companions – and what works with them
Onions operate as companions primarily through scent. The volatile compounds they release into the air around them confuse or deter pests that navigate by chemical signals, such as carrot fly, onion fly, and to some extent aphids and thrips.
This is a proximity effect: the closer the companion, the stronger the masking. Adjacent containers close enough that the foliage nearly touches is the right distance in a container setup.
The mechanism also works in reverse. Onions are themselves benefited by certain aromatic neighbours. Summer savory, chamomile – whose scents are reported to deter onion-specific pests and, in the case of chamomile, to improve bulb development. The relationship is not one-directional.
What disrupts the system: allium compounds that drift into the root zone of legumes. Beans and peas fix atmospheric nitrogen through rhizobia bacteria in their root nodules.
Allium root secretions inhibit those bacteria, reducing the legume’s ability to fix nitrogen and lowering yield. This isn’t a subtle effect – it’s consistent enough that keeping onions and legumes separated is one of the more firmly established rules in companion planting.

What to grow with onions
The companions below each provide a specific benefit – either to the onion, to both crops, or to the growing space as a whole. Every one of them is also a useful plant in its own right.
Carrots
The carrot and onion pairing is one of the most widely cited in companion planting, and the mechanism is specific enough to be worth understanding clearly. Carrot fly locates carrot plants by following volatile compounds the carrots release – particularly when the foliage is disturbed.
Onion scent masks those compounds, making it harder for the fly to locate the carrots. Onion fly does the same with onions, and carrot scent provides the masking in the other direction. Each crop makes the other slightly harder for its primary pest to find.
The evidence for this is real but not absolute. The masking reduces pest pressure; it doesn’t eliminate it. In a rooftop container setup, the adjacent container approach is the right configuration: carrots in their own deep container of 30cm+ placed directly beside the onion pot, close enough that the foliage intermingles slightly at the top. The scent proximity is the mechanism, so distance matters.
A fine mesh cover over both containers is still the most reliable carrot fly prevention. The onion companion works alongside that, not instead of it.
Chamomile
Chamomile is the companion plant most traditionally associated with improving onion growth and flavour. The claim that chamomile produces root secretions and airborne compounds that enhance bulb development in nearby onions appears consistently in traditional gardening literature.
The scientific documentation is limited, but the pairing is old enough and consistent enough to be worth including, with the honest caveat that the evidence is observational rather than controlled.
What chamomile does more measurably is attract beneficial insects. Its flowers bring in hoverflies, parasitic wasps, and other predatory insects that predate aphids and other soft-bodied pests. In a container setup where onions face aphid pressure through spring, that attraction is a practical benefit regardless of the flavour claim.
Grow chamomile in its own 10 to 15cm pot placed directly beside the onion container. German chamomile is the more commonly available annual variety; Roman chamomile is perennial but lower-growing. Either works.
Summer savory
Summer savory is a herb with a specific traditional role in allium companion planting: it’s reported to deter onion thrips, one of the more persistent and damaging onion pests, through the aromatic compounds it produces.
The evidence is observational and the deterrence is not guaranteed, but summer savory is a genuinely useful culinary herb – it pairs well with beans and vegetables in the kitchen – and the companion benefit is a reason to grow it near the onions rather than elsewhere.
Plant summer savory in its own 15cm pot placed adjacent to the onion containers. Harvest leaves regularly through the season to keep the plant producing and to delay flowering. Remove it or let it set seed and clear it at the end of the season – it’s an annual and won’t return the following year.
Lettuce
Lettuce makes productive use of the ground-level space between onion containers that onion foliage leaves empty. Onion plants grow upright with minimal lateral spread at ground level, which means the compost surface around each pot and the gaps between containers can hold a shallow trough of lettuce without any meaningful competition.
In partial shade conditions – a north-facing balcony or a rooftop corner shaded by taller crops – the shade onion foliage casts over adjacent containers is actually beneficial for lettuce, slowing the bolting that summer heat triggers. A shallow trough of 15cm depth placed between onion containers provides cut-and-come-again harvests through spring and early summer.
Full growing guide: How to grow lettuce in containers
Spinach
Spinach fills the early-season gap beside onions in the same way it does beside peppers and strawberries. Planted in early spring at the same time onion sets go in, spinach reaches harvest stage in 40 to 50 days.
Well before the onion bulbs have swelled to the point where they need the surrounding space. The two crops occupy the same area without meaningfully competing because their peak demands fall in different windows.
Sow spinach into its own shallow trough of 15cm depth placed alongside the onion container. Clear it when it begins to bolt in late spring and replace it with a summer crop.
Full growing guide: How to grow spinach in containers
Marigold
French marigold between onion containers suppresses nematode populations in the surrounding compost through root secretions – useful in any growing system where containers or grow bags are reused across seasons. A small 10cm pot of marigold placed in the gaps between onion containers takes almost no floor space and adds hoverfly attraction throughout the season.
Compatible neighbours – beet, parsley, tomato
Three plants are worth noting as compatible neighbours for onions without providing the active companion benefits of the plants above.
Beet
Beet and onions are compatible root crops that neither inhibit nor actively benefit each other. Both need 20 to 25cm of container depth and similar sun exposure. In a container setup where both are being grown, placing them in adjacent containers is a reasonable choice – they won’t interfere with each other.
Parsley
Parsley grows well in the partial shade between taller onion plants and attracts predatory insects through its flowers when it bolts in its second year. It’s a slow-growing herb that occupies its own pot without competing with onions for anything significant.
Tomatoes
Tomatoes benefit from onion proximity more than onions benefit from tomatoes. The allium compounds onions release into the air around them are reported to deter some of the aphid and whitefly pressure that tomatoes attract.
In a rooftop container setup where both crops are being grown, placing onion containers in the cluster around tomatoes adds a layer of deterrence at low cost.
What not to grow with onions
The bad companion list for onions is shorter than for some crops but more definitive.

Beans and peas
Beans and peas are the most important plants to keep away from onions. Allium compounds inhibit the rhizobia bacteria in legume root nodules – the bacteria responsible for fixing atmospheric nitrogen into a form the plant can use.
In practice, this means beans and peas grown near onions fix less nitrogen, grow less vigorously, and produce lower yields. Keep legumes at the opposite end of the growing space from alliums. This applies to garlic and chives as much as onions.
Sage
Sage is reported to inhibit onion growth when grown in close proximity. The mechanism is not well-documented, but the relationship is consistent enough in observational records to treat seriously.
Sage has enough value as a herb in its own right that it deserves a position away from onions rather than beside them.
Asparagus
Asparagus and onions are both long-season crops that compete for space and nutrients over time. Onions are also reported to inhibit asparagus crown development, making this combination a poor choice in any setup where both are being grown seriously. In a container system where asparagus is a long-term investment, keep it away from alliums entirely.
A few final words
Companion planting with onions is built around the allium scent and what it does -masking pest signals for neighbouring crops, deterring aphids and thrips, and in the case of legumes, disrupting root bacteria.
Use that scent where it helps: beside carrots, beside tomatoes, in the middle of a cluster of fruiting crops. Keep it away from beans and peas, which it actively harms.
For the garlic companion guide, which shares the same allium logic, the guide to growing with garlic covers the parallels and differences. And for the lettuce and spinach companions that fill the ground-level space so effectively around onion containers, the lettuce guide has the full growing detail.