Skip to content
Pencil-crayon illustration of a thriving home vegetable garden bed with companion-planted onions interlaced with carrots, lettuce, beets, brassicas, and a flowering chive in the corner
Peter Vogel

Peter Vogel

Peter Vogel is the founder of GrowPerma, bringing together evidence-based gardening advice with permaculture principles. When he's not writing about companion ...

Companion Planting May 7, 2026

Companion Planting Onions: Pest-Repelling Powerhouses

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.

~50%

Carrot Fly Reduction

Onion-carrot intercropping (extension trials)

23%

Higher Tomato Yield

Potato-onion intercropping with tomato (PMC 2024)

3-4 in

In-Row Onion Spacing

Bulb onions, U Maryland Extension

2 crops

To Avoid Near Onions

Beans and peas (legume nitrogen suppression)

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.

Pencil-crayon comparison illustration showing healthy peas growing alone on the left versus stunted yellowing peas next to bulbing onions on the right

Why Onions Repel Pests: The Sulphur Mechanism

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.

The Seven Best Onion Companions

CompanionWhat Onions DoWhat the Companion DoesSpacing
CarrotsMask carrot fly host odourDeter onion flyAlternate rows 4-6 in apart
Brassicas (cabbage, broccoli, kale)Deter aphids, cabbage maggotTall canopy provides afternoon shade for late onionsOnion ring 6-8 in from brassica trunk
TomatoesDeter spider mites and aphids; +23% tomato yield in intercrop trialsVertical structure leaves ground space free12 in between
LettuceDeter aphids; shallow root noncompeteGround-cover effect, conserves moisture6-8 in between
BeetsDeter pests at root zoneDifferent root depths reduce competition4-6 in between
StrawberriesSulphur deters slugs and snailsLiving mulch in onion alleys8-10 in between
PeppersDeter aphids and thripsTall structure does not crowd onions10-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

Pencil-crayon illustration of close-spaced rows of onions and carrots growing together with tall slender onion shoots alternating with feathery carrot tops

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.

The Two Crops That Reduce Yields

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.

A Worked 4 by 8 ft Raised Bed Plan

Pencil-crayon close-up of bulbing onions emerging from rich dark soil with mauve-purple chive flowers blooming nearby and a bumblebee visiting

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.

1

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.

2

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.

3

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.

4

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.

5

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.

Pencil-crayon top-down infographic of a 4 by 8 foot raised vegetable bed showing onions companion planted with carrots lettuce beets brassicas and tomatoes plus a corner avoid panel for beans and peas

Onion Variety Selection for Companion Planting

Not all onions behave the same in a companion bed. Match the variety to your daylength and bed plan.

Variety TypeLatitude / DaylengthCompanion UseNotes
Long-day bulb onionsNorthern US (above 36° N): zones 4-7Spring-planted main bed companionWalla Walla, Yellow Sweet Spanish; bulb when daylength reaches 14-16 hr
Short-day bulb onionsSouthern US (below 36° N): zones 7-10Fall-planted in southern climatesGranex, Red Burgundy; bulb at 10-12 hr daylength
Day-neutral / intermediateMost US zones (32-42° N)Highest flexibility for companion bedsCandy, Superstar; bulb at 12-14 hr
Scallions / green onionsAll zonesContinuous interplanting between cropsHarvest at 6-10 in, succession plant every 3 weeks
ShallotsAll zonesCompact planting around brassicasMultiplier habit, fewer pests
Egyptian walking onionsZones 3-9Perennial perimeter companionSelf-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 Chart

Onion Pests the Companions Cannot Solve

Common 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.

Pencil-crayon illustration of bulbing onions interplanted in a ring around young broccoli and cabbage plants to deter aphids and cabbage maggot

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.

Frequently Asked Questions

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

Browse All Guides →

Resources

Get the Weekly Dig

One email a week. Practical permaculture tips, seasonal planting guides, and zero spam. Join 2,000+ gardeners growing smarter.

Subscribe Free