Yes, onions and tomatoes can grow in the same bed, but timing and spacing matter
Onions and tomatoes are compatible garden neighbours. They don't compete for the same nutrients, they don't attract the same pests, and neither one produces chemicals that harm the other. You can plant them in the same bed or even near each other in rows. The catch is that onions and tomatoes grow on different schedules, so you need to plan where each one goes and when you'll harvest.
Onions mature in 90 to 120 days depending on the variety. Tomatoes take 60 to 85 days from transplant to first fruit, but they keep producing for months. If you plant them at the same time, your onions will be ready to pull up while your tomatoes are still flowering. That's fine — you just need to know it's coming so you don't accidentally disturb the tomato roots when you dig out the onions.
Key Takeaways
- Onions and tomatoes don't compete for nutrients or attract the same pests, making them safe to plant together in the same bed.
- Space onions 4 to 6 inches apart and tomatoes 24 to 36 inches apart, depending on the tomato variety, so they have room to grow without crowding.
- Plant onions from sets or transplants in early spring so they mature and are ready to harvest before tomatoes reach full size and need more water.
- Both plants need full sun and well-draining soil, so prepare the bed the same way you would for either crop alone.
How to space onions and tomatoes in the same bed
Onions need much less space than tomatoes. A mature onion bulb is 1 to 3 inches across, and the plant stays upright and compact. Space onion sets or transplants 4 to 6 inches apart in rows. Tomatoes, especially indeterminate varieties that grow tall and wide, need 24 to 36 inches between plants so air can move around the foliage and prevent disease.
One practical layout is to plant tomatoes in one section of the bed and onions in another, rather than mixing them throughout. This makes it easier to harvest onions without stepping near the tomato roots, and it's simpler to manage watering and mulching for each crop. If your bed is narrow, you can plant a single row of onions along one edge and tomatoes in the middle or opposite edge.
Determinate tomatoes (bush types that stay compact) give you more flexibility. They take up less space, so you can tuck onions closer without worrying about shade or crowding. Check the seed packet or plant label to see whether your variety is determinate or indeterminate.
Timing: when to plant onions so they don't interfere with tomatoes
Plant onions first, in early spring as soon as the soil is workable. Onion sets (small dormant bulbs) go in 2 to 3 weeks before the last frost. Onion transplants can go in at the same time or a few weeks later. Tomatoes go in after the last frost date in your area, when soil has warmed to at least 60°F.
By the time you transplant tomatoes, onions will already have 4 to 6 weeks of growth. They'll be established and less vulnerable to disturbance. When onions reach maturity in early to midsummer, you'll pull them up and clear that space. Your tomatoes will be in their peak growth phase and won't miss the onions at all.
If you want to succession-plant (plant new crops as old ones finish), you can also plant a second round of onions in late summer for a fall harvest, after tomatoes are done for the season. This keeps the bed productive without the two crops overlapping.
Soil and sunlight requirements for both crops
Onions and tomatoes both need full sun — at least 6 to 8 hours of direct light per day. Tomatoes prefer 8 hours or more. If your bed gets less than 6 hours, tomatoes will struggle more than onions, so prioritize sun for the tomatoes.
Both crops need well-draining soil rich in organic matter. Work compost or aged manure into the bed before planting. Onions prefer soil that's not too rich in nitrogen (excess nitrogen delays bulb formation), while tomatoes are heavy feeders and benefit from regular fertilizer. You can balance this by adding a balanced fertilizer at planting and then side-dressing tomatoes with extra nitrogen as they grow, without affecting the onions you've already harvested.
Watering onions and tomatoes together
Onions need consistent moisture while they're growing, but they prefer soil that dries out slightly between waterings. Tomatoes also like consistent moisture but are more sensitive to drought stress once they start flowering and fruiting. Both plants need about 1 to 1.5 inches of water per week, so watering the bed together works well.
The main difference shows up late in the season. Once onions mature, you can stop watering them — in fact, stopping water a week or two before harvest helps the bulbs cure and store better. Tomatoes, by contrast, still need steady water through the end of the season. If your onions are already harvested by then, this isn't a problem. If they're still in the ground, water the tomatoes and accept that the onions will get some of that water too.
Pests and diseases: why onions and tomatoes don't interfere
Onions and tomatoes attract different pests. Tomatoes draw hornworms, whiteflies, and spider mites. Onions attract onion flies and thrips. Because the pests are different, growing them together doesn't increase pest pressure on either crop. In fact, some gardeners believe onions repel certain tomato pests, though this isn't proven.
Disease-wise, the two crops don't share major problems either. Tomato blight and powdery mildew affect tomatoes but not onions. Onion rot diseases don't typically affect tomatoes. Good air circulation and avoiding overhead watering protect both crops from fungal disease regardless of what else is growing nearby.
Fertilizing when onions and tomatoes share a bed
Onions need moderate fertility. A balanced fertilizer (like 10-10-10) at planting is usually enough. They don't need heavy feeding. Tomatoes, by contrast, are heavy feeders and benefit from fertilizer every 2 to 3 weeks once they start flowering.
If you're fertilizing the whole bed, use a balanced formula that won't overfeed the onions. Once you harvest the onions, you can switch to a tomato-specific fertilizer (higher in phosphorus and potassium, lower in nitrogen) for the rest of the season without worrying about affecting the onions. Alternatively, fertilize only the tomato plants by explore fertilizer directly to the soil around their base rather than broadcasting it across the bed.
Frequently Asked Questions
Do onions really keep pests away from tomatoes?
This is a common garden belief, but there's no strong scientific evidence that onions repel tomato pests. Onions and tomatoes attract different pests, so growing them together doesn't increase pest problems — but the onions aren't actively protecting the tomatoes either. They're straightforward not bothering each other.
Can I plant onions and tomatoes at the same time?
Yes, but it's not ideal. Onions mature faster and will be ready to harvest while tomatoes are still growing. Planting onions 4 to 6 weeks earlier gives them a head start so they're established before tomatoes go in, and they'll be done and out of the way by the time tomatoes need maximum space and resources.
What if my tomatoes shade the onions?
Onions tolerate partial shade better than tomatoes do, but they still need at least 4 to 5 hours of direct sun to form good bulbs. Plant onions where they'll get morning sun, and position taller tomato varieties so they shade the onions only in the afternoon. Since onions mature and are harvested before tomatoes reach full size, shading is usually a short-term issue.
Can I plant garlic with tomatoes too?
Yes. Garlic and onions have similar growing requirements and pest profiles, so garlic works just as well as onions in a tomato bed. Garlic takes longer to mature (6 to 8 months), so you'd plant it in fall for a late-spring harvest, which means it would be mostly done before tomatoes go in.
Should I mulch around both crops?
Mulch helps both onions and tomatoes by retaining moisture and keeping soil temperature steady. Use 2 to 3 inches of compost or straw around the base of each plant, keeping it a few inches away from the stem to prevent rot. Mulch around onions helps keep soil moisture consistent, which improves bulb quality.