Onions earn their place in almost every successful vegetable garden because they do two jobs at once. They produce a storage crop you can use until next April, and the same sulphur compounds that make you cry when you chop them quietly repel half the pest natural garden pest controls that would otherwise hammer your carrots, brassicas, and tomatoes. The catch (and the reason most gardeners get half the benefit) is knowing exactly which crops to plant near them and which two crops to plant far away.
This guide gives you the science of how onion sulphur compounds work, the seven highest-impact onion pairings, the two combinations that actively reduce yields, and a worked 4 by 8 ft raised bed plan you can copy this weekend. Every recommendation cites peer-reviewed research or a US university extension service. For the full crop-by-crop pairings reference, see our complete companion planting chart.
Key Takeaway
Plant onions with carrots, brassicas, lettuce, beets, strawberries, tomatoes, and peppers. The onion's sulphur-containing cysteine sulfoxides mask host odours and deter aphids, carrot fly, cabbage maggot, and spider mites. Keep onions away from beans and peas: their sulphur exudates suppress the rhizobia bacteria that legumes need to fix nitrogen. Space onions 3 to 4 inches apart in row, with companion crops at 6 to 12 inches separation.
Cut an onion and you release the same chemistry that protects your garden. Onions and the rest of the Allium family (garlic, leeks, chives, shallots, scallions) store cysteine sulfoxides in their tissue. When tissue is damaged or even just disturbed, the enzyme alliinase converts these compounds into volatile sulphur molecules including allicin, propanethial S-oxide, and disulfides. These molecules disrupt insect olfaction. A 2024 review on Allium plant defense confirms these volatiles repel aphids, mites, thrips, and several flying pests by interfering with their host-finding chemoreceptors.
The practical effect is that an aphid landing on a tomato plant surrounded by onions cannot smell the tomato as clearly as one in a mono-cropped tomato bed. Carrot fly, drawn to carrots by the smell of crushed foliage, is similarly confused when onion volatiles drift through the bed. Utah State University Extension recommends interplanting alliums as a first-line cultural control for carrot rust fly.
Why This Works: Stacking Functions
Onions earn three jobs in one bed: storage food, soil-aroma pest deterrent, and (when you let a few flower) early-season pollinator nectar. That is a textbook example of stacking functions, a core permaculture design principle. When a single plant solves multiple problems, your garden gets denser and more resilient with no extra labour.
| Companion | What Onions Do | What the Companion Does | Spacing |
| Carrots | Mask carrot fly host odour | Deter onion fly | Alternate rows 4-6 in apart |
| Brassicas (cabbage, broccoli, kale) | Deter aphids, cabbage maggot | Tall canopy provides afternoon shade for late onions | Onion ring 6-8 in from brassica trunk |
| Tomatoes | Deter spider mites and aphids; +23% tomato yield in intercrop trials | Vertical structure leaves ground space free | 12 in between |
| Lettuce | Deter aphids; shallow root noncompete | Ground-cover effect, conserves moisture | 6-8 in between |
| Beets | Deter pests at root zone | Different root depths reduce competition | 4-6 in between |
| Strawberries | Sulphur deters slugs and snails | Living mulch in onion alleys | 8-10 in between |
| Peppers | Deter aphids and thrips | Tall structure does not crowd onions | 10-12 in between |
Sources: Utah State Extension on carrot rust fly, AgEcon Search: Onion as Pest Control Intercrop in Cabbage, PMC 2024: potato-onion intercropping enhances tomato yield, University of Maryland: growing onions in a home garden
The carrot-and-onion pairing is the textbook case. Carrot fly females locate plants by olfactory cues; the onion volatiles confuse host-finding within a 1-metre radius. Reciprocally, the carrot foliage masks onion fly attraction. The combined effect is documented in extension trials and in popular practitioner literature like our guide to companion planting carrots.
Onions actively suppress two crop families. The science here is real, not folklore.
Beans and peas. Legumes form symbiotic relationships with rhizobia bacteria that fix atmospheric nitrogen in root nodules. A 2020 PMC review on rhizobia nitrogen fixation documents that sulphur exudates from Allium roots interfere with rhizobial colonization, reducing nodulation and therefore reducing nitrogen fixation in nearby legumes. The visible result is yellowing pea or bean plants and lower pod yields when planted within 2 to 3 feet of onions or garlic.
Asparagus. The roots compete for nutrients in the same soil layer, and asparagus is sensitive to root disturbance. Cornell Cooperative Extension's Ask Extension service advises against onion-asparagus pairings.
Sage is sometimes added to the avoid list, though the evidence is weaker. If you have a perennial sage bed and want onions, give them at least 2 feet of separation. For more on combinations to avoid, see our deeper analysis in companion planting mistakes.
Here is the layout that delivers the highest pest-suppression benefit and the most stacked yield from a standard 4 by 8 ft raised bed in zones 5 to 8. Plant in early to mid spring after soil temperature reaches 50°F.
North end (1.5 ft strip): brassicas + onion ring
Plant 2 broccoli or cabbage transplants 18 inches apart. Surround each with a ring of 6 to 8 onion sets at 6 inches from the brassica stem. The onions deter cabbage maggot and aphids during establishment.
Middle 4 ft: alternating onion-carrot rows
Run 4 rows the long way: row 1 onions, row 2 carrots, row 3 onions, row 4 carrots. Onions at 3 inch spacing, carrots at 2 inch spacing, rows 4 to 6 inches apart. This is the highest-yield section of the bed and the strongest pest deterrent zone.
South end (1.5 ft strip): tomato + onion ring + lettuce edge
One indeterminate tomato in the centre, staked or caged. Surround with 6 onion sets at 10 to 12 inches. Edge with red leaf lettuce as a living mulch on the south face.
Edge (perimeter): chives + nasturtium
Tuck a clump of chives at one corner (perennial, will return next year) and 2 to 3 nasturtium seedlings at the opposite corner. Chives flower early for pollinators; nasturtium acts as a trap crop drawing aphids away from the bed centre.
Avoid this section
Do not put bush beans, pole beans, or snap peas in the same bed. Locate any legume bed at least 3 ft from the onion section to avoid nitrogen fixation suppression.
Not all onions behave the same in a companion bed. Match the variety to your daylength and bed plan.
| Variety Type | Latitude / Daylength | Companion Use | Notes |
| Long-day bulb onions | Northern US (above 36° N): zones 4-7 | Spring-planted main bed companion | Walla Walla, Yellow Sweet Spanish; bulb when daylength reaches 14-16 hr |
| Short-day bulb onions | Southern US (below 36° N): zones 7-10 | Fall-planted in southern climates | Granex, Red Burgundy; bulb at 10-12 hr daylength |
| Day-neutral / intermediate | Most US zones (32-42° N) | Highest flexibility for companion beds | Candy, Superstar; bulb at 12-14 hr |
| Scallions / green onions | All zones | Continuous interplanting between crops | Harvest at 6-10 in, succession plant every 3 weeks |
| Shallots | All zones | Compact planting around brassicas | Multiplier habit, fewer pests |
| Egyptian walking onions | Zones 3-9 | Perennial perimeter companion | Self-propagating bulbils, low maintenance |
Sources: University of Minnesota Extension: growing onions, NC State Extension: bulb onions, Ohio State CFAES: growing onions in the garden
For pest-deterrent benefit specifically, scallions and shallots punch above their weight. They mature fast, can be tucked between every other companion plant, and can be harvested green to make space as larger crops fill in. Many gardeners report the strongest results by combining bulb onions for storage with continuous succession of scallions for pest deterrence. The full perennial onion family is worth understanding too; our companion planting herbs guide covers chives in detail.
Get Our Free Companion Planting Chart
Join 10,000+ gardeners getting weekly tips on what to plant together, soil health, and permaculture techniques.
Send Me the ChartCommon Mistake to Avoid
Assuming companion planting eliminates onion pests. Onion thrips, onion maggot, and downy mildew can still hit a companion-planted bed. Use companion planting as one layer of integrated management, alongside crop rotation (3-year minimum away from Allium), drip irrigation rather than overhead watering (downy mildew thrives on wet foliage per UC IPM), and floating row covers during peak onion-fly flight (Penn State documents peak maggot activity in spring).
The other failure modes:
Watering by sprinkler. Wet foliage triggers downy mildew, which spreads through onion plantings within 5 to 7 days. Drip or soaker hose only.
Skipping crop rotation. Even with companion planting, onion maggot populations build in soil over consecutive years. Rotate the onion bed at least 30 ft and at least 3 years away from any prior Allium.
Planting too late. Spring-planted bulb onions need 90 to 120 days. In zones 4-6, plant by mid-April or use sets/transplants. Late starts produce small bulbs that store poorly.
Over-fertilising with nitrogen. Excess N grows tall floppy leaves but reduces bulb formation. Apply nitrogen at planting and once 4 weeks later; stop after bulbing begins.
For pest-control framing across the rest of your bed, see our guide to plants that repel pests, and for tomato-specific pairings (one of the strongest onion companions), the tomato companion guide covers the full pairing chart. Soil health under the bed matters too; mature compost feeds the rhizosphere onions depend on, see our composting for beginners guide for the foundations.
What can I plant with onions?
The seven highest-impact companions are carrots, brassicas (cabbage, broccoli, kale), tomatoes, lettuce, beets, strawberries, and peppers. Onion sulphur compounds deter aphids, carrot fly, cabbage maggot, and spider mites that affect each of these crops. Add chives or nasturtium at bed edges for additional pest control and pollinator support.
What should you not plant with onions?
Avoid beans and peas. Sulphur exudates from onion roots interfere with the rhizobia bacteria that legumes need to fix nitrogen, reducing nodulation and lowering legume yields. Keep beans and peas at least 3 ft from any onion or garlic bed. Avoid asparagus due to root competition. Sage is also sometimes flagged though the evidence is weaker.
Can you plant onions with tomatoes?
Yes, this is one of the strongest onion pairings. A 2024 PMC study on intercropping found tomato yields increased 23 percent when interplanted with onions, with simultaneous reduction in spider mite and aphid pressure. Space onions 10 to 12 in from the tomato stem in a ring, or alternate every 12 in along a tomato row.
Can you plant onions and lettuce together?
Yes. Onion and lettuce share neither root depth nor pest pressure, so they coexist with no negative interactions. Lettuce benefits from the onion's aphid deterrence, and the lettuce leaf canopy acts as living mulch around onion bases. Plant onions at 3 to 4 in spacing, lettuce 6 to 8 in away.
Can you plant onions with cucumbers?
Yes, with caveats. Cucumbers are not antagonistic to onions, but they have very different water needs (cucumbers want consistent heavy moisture, onions prefer to dry between waterings). They coexist best in a bed with drip irrigation zones, where you can water the cucumber section more heavily than the onion section. Space at least 18 in apart.
How close should I plant onions to companions?
In-row onion spacing is 3 to 4 in for bulb varieties. Companion crops should be 6 to 12 in away depending on size: 6 in for shallow-rooted greens like lettuce, 8 to 10 in for medium crops like beets and strawberries, 12 in for large crops like tomatoes and peppers. The pest-deterrent effect operates at roughly a 1 m radius, so closer placement maximises the benefit without competition.
Do onions repel rabbits and deer?
Partially. The strong sulphur smell deters most browsing mammals, but a hungry rabbit will eat anything if pressed. Onions are best treated as a moderate deterrent layered with physical fencing or barriers. They are more reliable for insect pests than for vertebrate pests.
Do all alliums (garlic, leeks, chives) work the same way?
Largely yes. Garlic, leeks, chives, scallions, and shallots all contain similar sulphur compounds and provide similar pest deterrence. Garlic is more potent on a per-plant basis (higher allicin), making it especially good around brassicas. Chives flower earlier than onions and add pollinator value. Mix several alliums for layered protection.
Ready to Grow Smarter?
Get our free beginner's guide to permaculture gardening, 12 pages of practical tips you can use this weekend.
Download the Free Guide