Yes, you can plant tomatoes and onions together, and they make good companions
Tomatoes and onions grow well in the same bed because they have different root depths and nutrient needs. Onions are shallow-rooted and won't compete with tomato roots for water and nutrients deep in the soil. They also don't shade each other out — onions stay low while tomato plants grow tall. The real benefit is practical: onions naturally repel some pests that bother tomatoes, particularly spider mites and aphids, because of their sulfur compounds.
The main thing to watch is spacing. Plant onions 4 to 6 inches apart in rows, and give each tomato plant 24 to 36 inches of space. If you're planting onion sets (the small bulbs) rather than seeds, they go in shallower — about 1 inch deep — while tomato transplants need a deeper hole. Both prefer full sun and well-draining soil, so your bed setup works for both.
Key Takeaways
- Tomatoes and onions are compatible because onions are shallow-rooted and won't steal water and nutrients from tomato roots deeper in the soil.
- Onions naturally repel spider mites and aphids, which are common tomato pests, reducing the need for pest control in a shared bed.
- Space onions 4 to 6 inches apart and tomato plants 24 to 36 inches apart to prevent crowding and may support both get enough light.
- Plant onion sets about 1 inch deep and tomato transplants 6 to 8 inches deep, burying the stem up to the first true leaves.
- Both crops need full sun and well-draining soil, so a single bed can meet both requirements without amendment changes.
How to arrange tomatoes and onions in the same bed
The simplest layout is to plant onions in rows between tomato plants. If your bed is 4 feet wide, plant one row of tomatoes down the center (one plant every 2 to 3 feet along the row) and two rows of onions on either side, 6 inches from the tomato row. This gives onions enough light and keeps them out of the way when you tie up and prune tomato vines.
Alternatively, plant tomatoes on the north side of the bed (so they don't shade the onions) and onions on the south side. This works especially well if your bed runs east to west. Onions mature in 90 to 120 days depending on variety, so you can harvest them before tomatoes reach full size, opening up space if you need it later in the season.
Avoid planting onions directly at the base of tomato plants. The tomato stem needs air circulation to prevent fungal disease, and onions sitting right against it trap moisture. Leave at least 6 inches between an onion and a tomato stem.
Timing: when to plant each crop
In most regions, you'll plant tomato transplants (not seeds) after the last frost date, when soil is warm — usually mid-spring. Onions can go in earlier. If you're planting onion sets, they tolerate cold soil and can go in 2 to 4 weeks before your last frost. If you're planting onion seeds, start them indoors 8 to 10 weeks before your last frost, then transplant seedlings into the bed at the same time as tomatoes.
The advantage of starting onions early is that they'll be ready to harvest by mid-summer, before tomato plants are at peak size. This gives you a cleaner bed to work in during the busy tomato season. If you want a continuous harvest, plant onion sets in two batches — one in early spring and another 4 weeks later — so you have fresh onions throughout the season.
Watering and feeding two crops at once
Both tomatoes and onions need consistent moisture, but onions need less. Tomatoes want the soil to dry slightly between waterings (about 1 to 2 inches per week), while onions prefer steady moisture without waterlogging. The good news is that onions' shallow roots dry out faster than tomato roots, so a single watering schedule usually works if you water deeply enough to reach tomato roots but not so often that onions sit in wet soil.
Water at the base of both plants, not overhead. Wet foliage on tomatoes invites fungal disease, and wet onion leaves can rot. Drip irrigation or soaker hoses work best for a mixed bed because they deliver water exactly where roots are.
For fertilizer, tomatoes are heavier feeders than onions. Work compost or aged manure into the bed before planting both crops. Once they're growing, feed tomatoes every 2 to 3 weeks with a balanced fertilizer or one slightly higher in phosphorus and potassium (the last two numbers on the bag). Onions don't need supplemental feeding if the soil is rich, but a light process of nitrogen-heavy fertilizer when they're young (4 to 6 weeks in) helps bulb development.
Pests and diseases: the real advantage of pairing these crops
Onions produce sulfur compounds that repel spider mites, aphids, and thrips — all common tomato pests. Planting onions nearby doesn't eliminate these pests entirely, but it reduces their numbers enough that you may not need insecticide sprays. This is especially useful if you're trying to avoid chemicals in your garden.
The pairing also helps with disease prevention. Onions are susceptible to different fungal diseases than tomatoes (onion mildew versus tomato early blight, for example), so growing them together doesn't increase disease pressure on either crop. Keep the bed well-spaced and water at soil level to prevent the humidity that fungal diseases love.
Watch for onion maggots and root rot in onions, and early blight and septoria leaf spot in tomatoes. These are separate problems that won't spread between the two crops, but they're worth monitoring. Remove affected leaves or plants promptly to prevent spread.
What not to plant near tomatoes and onions
While tomatoes and onions are good together, avoid planting them with brassicas (cabbage, broccoli, kale) in the same bed. Brassicas compete with tomatoes for nutrients and can harbor pests that affect both crops. Fennel and dill also don't pair well with tomatoes — they attract different beneficial insects and can inhibit tomato growth.
Potatoes should not share a bed with tomatoes because both are in the nightshade family and attract the same pests and diseases, particularly late blight. Corn and beans are fine with tomatoes but compete for space in a small bed, so reserve them for separate areas if you're working with limited garden space.
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. Pull them gently to avoid jostling nearby tomato roots. If onions are planted in a separate row, you can harvest the entire row at once and clear that space for a second planting or for tomato vines to sprawl as they grow larger.
Let harvested onions cure in a warm, dry, well-ventilated spot for 2 to 3 weeks before storing. This hardens the skin and extends storage life. You can cure them right in the garden bed if weather is dry, or move them to a shed or garage. Curing in place keeps the bed tidy while tomatoes continue growing.
Frequently Asked Questions
Do onions really keep pests off tomatoes?
Onions reduce pest pressure but don't eliminate it. Their sulfur compounds repel spider mites, aphids, and thrips, so you'll see fewer of these pests in a bed with onions than in one without. You may still need to monitor for heavy infestations and spray if populations spike, but the pairing does provide some natural protection.
Can I plant garlic with tomatoes too?
Yes, garlic works the same way as onions — shallow roots, natural pest repellent, and no competition with tomatoes. Plant garlic cloves in fall for a spring harvest, or plant them in early spring for a summer harvest. The timing is more flexible than onions, so garlic is a good choice if you want to fill gaps in your planting schedule.
What if my onions are getting shaded by tomato vines?
Onions need at least 6 hours of direct sun. If tomato vines are blocking light, prune lower tomato branches to let light reach onions, or move onions to the south side of the bed where they'll stay in sun longer. You can also harvest onions early — they don't have to reach full size — to open up space before tomatoes get too large.
Can I plant onions and tomatoes in containers together?
Yes, but use a large container — at least 20 gallons for one tomato plant and several onions. The tomato needs depth for its roots, and onions need space to bulb without crowding. A 4-foot-long window box or a large fabric pot works if you space plants carefully. Water more often than you would in a bed because containers dry out faster.
Should I use the same soil for both crops?
Yes. Both tomatoes and onions do well in soil rich in organic matter with good drainage. Mix in 2 to 3 inches of compost before planting, and both crops will thrive. You don't need separate soil mixes — a single well-prepared bed works for both.