Yes, onions and tomatoes grow well as companion plants
Onions and tomatoes can be planted in the same bed and will thrive together. Onions actually help tomatoes by repelling some common pests, particularly spider mites and aphids, which means you may need fewer pesticides. The two plants have different root depths—tomatoes root deeper while onions stay shallow—so they do not compete for water and nutrients in the same soil layer. They also mature on different schedules, which means you can harvest onions before they crowd the tomato plants as they grow taller.
The main thing to watch is spacing. Tomatoes need room to spread their branches and get air circulation to prevent disease, while onions need just enough space to form their bulbs. Planting them correctly from the start prevents problems later.
Key Takeaways
- Onions repel spider mites and aphids, two pests that commonly damage tomato plants, making them useful neighbors in the same bed.
- Plant onions at least 6 inches away from tomato stems to give tomatoes room to grow without crowding.
- Onions mature in 90 to 120 days and can be harvested before tomato plants reach full size, freeing up space in the bed.
- Both plants prefer similar watering schedules and soil conditions, so they do not require separate care routines.
How to space onions and tomatoes in the same bed
Start by planting tomatoes first, since they need the most space and will be in the ground longest. Space tomato plants 24 to 36 inches apart, depending on the variety—determinate types (bush tomatoes) need less room than indeterminate types (vining tomatoes). Once tomatoes are in, plant onions in the gaps between them.
Keep onions at least 6 inches away from the tomato stem. Onions can be planted much closer together than tomatoes—typically 4 to 6 inches apart for bulbing varieties. This means you can fit several onions in the space between two tomato plants without any conflict. As the tomato plant grows and its branches spread, the onions will already be maturing, so they will not be in the way.
If you are planting from seed, sow onion seeds directly into the soil about 2 weeks before transplanting tomato seedlings. This gives the onions a head start so they are more established when tomatoes go in the ground.
Watering and feeding both plants together
Onions and tomatoes both prefer consistent moisture without waterlogging. Water deeply when the top inch of soil feels dry, which is usually every 2 to 3 days in warm weather, depending on rainfall and soil type. Both plants will benefit from the same watering schedule, so you do not need to adjust your routine.
For nutrients, tomatoes are heavier feeders than onions. If you mixed compost or aged manure into the bed before planting, onions will have enough nutrition for the season. Tomatoes may need a side dressing of balanced fertilizer (such as 5-5-5) or a tomato-specific formula once they start flowering. explore fertilizer around the tomato base, away from the onion bulbs, to avoid overfeeding the onions, which can delay bulb formation.
Harvesting onions without disturbing tomatoes
Onions are ready to harvest when the tops fall over and turn brown, usually 90 to 120 days after planting. At this point, tomatoes are often still flowering or just beginning to set fruit, so you have room to work. Gently pull onions straight up to avoid jostling nearby tomato plants, or use a garden fork to loosen the soil around the bulb first.
Once onions are out of the bed, you have freed up space and removed any risk of them shading the tomato plants as they grow taller. The bare soil can be mulched to retain moisture for the tomatoes during the hot months ahead.
Pests that onions help control
Spider mites are tiny pests that suck juice from tomato leaves, causing yellow speckles and fine webbing. Onions release a sulfur compound that repels them. Aphids cluster on new tomato growth and can spread viruses; the onion smell deters them as well. Neither pest is completely eliminated by onion proximity, but the pressure is reduced enough that you may avoid spraying altogether or spray less often.
Onions do not repel all tomato pests. Hornworms, whiteflies, and early blight fungus are not affected by onion presence, so you still need to scout for these problems and treat them if they appear. The benefit is real but partial.
Plants to avoid near onions and tomatoes
While onions and tomatoes are compatible, both have poor companions. Do not plant fennel, dill, or beans near either one—fennel inhibits growth in most vegetables, and beans can attract pests that also target tomatoes. Brassicas (cabbage, broccoli, kale) compete with tomatoes for nutrients and do not pair well with onions either.
Basil, parsley, and marigolds are all good companions for tomatoes and will not interfere with onions, so if you want to add more plants to the bed, choose from those instead.
Soil preparation for both crops
Prepare the bed by mixing in 2 to 3 inches of compost or aged manure before planting. Both onions and tomatoes prefer soil with good drainage and a pH between 6.0 and 6.8. If your soil is heavy clay, add compost to improve texture so water does not pool around the roots. If it is very sandy, compost will help it hold moisture longer.
Test your soil if possible—a straightforward kit from a garden center or a test through your local extension office will tell you the pH and nutrient levels. Tomatoes especially benefit from adequate calcium (which prevents blossom-end rot) and phosphorus (which supports flowering). Onions are less demanding but still grow better in soil that has been amended.
Frequently Asked Questions
Do onions stunt tomato growth?
No. Onions are shallow-rooted and do not compete with tomatoes for deep soil nutrients or water. They mature and are harvested before tomatoes reach full size, so there is no crowding effect if you space them correctly.
Can I plant onion sets instead of seeds?
Yes. Onion sets (small bulbs) are faster than seeds and will be ready to harvest in 60 to 90 days. Plant them at the same spacing as seedlings—4 to 6 inches apart and 6 inches away from tomato stems. Sets are easier for beginners because they are less fussy than seeds.
What if my tomato plant gets very large and shades the onions?
Onions need at least 4 to 6 hours of direct sun per day. If a tomato plant is shading them heavily, the onion bulbs may not form properly. Prune lower tomato branches to let more light reach the onions, or plant onions on the east or south side of the tomato where they get morning sun.
Can I plant onions after I harvest tomatoes in the fall?
Yes, if your growing season is long enough. Fall-planted onions need 90 to 120 days to mature, so count backward from your first frost date. In most regions, plant onions in late summer or early fall so they finish before winter. Spring-planted onions are more common and more reliable for most gardeners.