Yes, onions and tomatoes grow well as neighbors in the garden
Onions and tomatoes can be planted near each other without harm to either crop. In fact, many gardeners plant them together because they have different root depths and nutrient needs, so they do not compete for the same resources in the soil. Onions are a companion plant for tomatoes — meaning they can improve growing conditions rather than interfere with them.
The main benefit is pest management. Onions release a sulfur compound that repels spider mites, aphids, and some beetles that commonly attack tomato plants. Tomatoes, in turn, do not produce anything that harms onions. Neither plant shades the other excessively if spaced correctly, and neither produces root chemicals that poison the soil for the other.
Key Takeaways
- Onions and tomatoes can be planted within 12 to 18 inches of each other without competing for water or nutrients.
- Onions help repel common tomato pests like spider mites and aphids through their natural sulfur smell.
- Plant onions on the outer edge of your tomato bed or in alternating rows to maximize space and pest protection.
- Water both plants at the base to keep foliage dry, since wet leaves on either plant can develop fungal disease.
- Harvest onions before they begin to bulge significantly, so their expanding roots do not disturb nearby tomato roots.
How to space onions and tomatoes together
Plant onions at least 12 inches away from the center of each tomato plant. If you are using transplants (seedlings), measure from the main stem of the tomato. Onions need less vertical space than tomatoes, so they work well as a border around the outside of a tomato bed or in the row directly in front of taller tomato plants.
For a single row layout, alternate tomato plants with onion sets or seedlings, spacing tomatoes 24 to 36 inches apart and onions 4 to 6 inches apart within that space. This gives onions room to develop without crowding, while keeping them close enough to benefit tomatoes. If you are planting in blocks or clusters, place onions on the perimeter rather than mixed throughout the center.
Avoid planting onions directly under tomato branches that will shade them heavily as the tomato plant grows. Onions need at least 6 hours of direct sun daily, and tomatoes need 8 or more. Both plants will produce better if they receive full sun, so choose a bed location that gets unobstructed light for most of the day.
Watering and feeding when onions and tomatoes share space
Water both plants at soil level, directing water to the base of each plant rather than overhead. Wet foliage on either onions or tomatoes creates conditions for fungal diseases like early blight and powdery mildew. A soaker hose or drip line works better than a sprinkler when the two crops are planted close together.
Onions and tomatoes have different feeding schedules. Tomatoes are heavy feeders and benefit from nitrogen early in the season, then phosphorus and potassium as they flower and fruit. Onions need moderate nitrogen throughout their growing season but do not require the extra phosphorus that tomatoes do later. A balanced fertilizer applied once at planting, followed by a tomato-specific formula when flowers appear, will feed both crops without over-fertilizing the onions.
Check soil moisture by inserting your finger 2 inches into the soil. Both plants prefer soil that is moist but not waterlogged. Onions are more sensitive to standing water and will rot if drainage is poor, so if your bed tends to stay wet, plant onions slightly higher or in a mounded row.
Timing the harvest so roots do not interfere
Onions mature in 90 to 120 days depending on variety, while tomatoes fruit for 60 to 85 days after flowering. This means onions will often be ready to harvest before tomatoes reach peak production. Pull onions as soon as their tops begin to yellow and fall over — usually in mid to late summer. Do not wait for them to fully dry in the ground, because their expanding bulbs can disturb the roots of nearby tomato plants.
Once you harvest the onions, the space they occupied opens up for the tomato roots to expand without competition. This is actually beneficial for the tomato plant in its final weeks of fruiting. If you want a continuous onion harvest, you can plant a second round of onion sets 4 to 6 weeks before your first frost date, but keep them at least 18 inches from tomato plants that are still actively producing.
Onion varieties that work best with tomatoes
Short-day onion varieties (which form bulbs when days are 10 to 12 hours long) work well in most regions where tomatoes grow. Common varieties include Texas 1015, Vidalia, and Maui. Long-day varieties (which need 14 to 16 hours of daylight) are better for northern gardens. Both types grow well alongside tomatoes as long as they receive adequate sun and are harvested before their bulbs become too large.
Green onions (scallions) are an even easier companion choice because they mature faster — 60 to 75 days — and their roots stay shallow and small. You can plant them much closer to tomatoes, even within 6 inches, and harvest them before they ever become a space issue. Many gardeners use green onions as a quick-growing border around tomato plants, then replant them after harvest.
Common mistakes to avoid
The most frequent error is planting onions too close to the tomato stem. Onions need their own space to develop, and crowding them against the tomato plant stresses both. Leave at least 12 inches between the center of the tomato and the nearest onion bulb.
Another mistake is overhead watering. Wet onion foliage can develop fungal disease just as easily as tomato foliage, and the two plants' leaves will touch if they are planted close together. Water only at the soil surface, especially in humid climates or during wet seasons.
Planting onions in shade is also common. Gardeners sometimes assume that because onions are smaller, they can go in the partial shade under tomato branches. Onions will grow in partial shade but will produce smaller bulbs and take longer to mature. Give them their own patch of direct sun whenever possible.
Other plants that pair well with tomatoes and onions
If you want to expand your companion planting, basil, parsley, and marigolds all grow well alongside both tomatoes and onions. Basil repels flies and mosquitoes while improving tomato flavor. Marigolds deter nematodes and other soil pests. Carrots and lettuce can also be tucked into the spaces between onions and tomatoes, since they mature quickly and do not compete for nutrients.
Avoid planting fennel, dill, or cabbage near tomatoes or onions. Fennel and dill release chemicals that inhibit growth in many vegetables, and cabbage attracts some of the same pests as tomatoes, which defeats the purpose of companion planting.
Frequently Asked Questions
Do onions really keep pests off tomatoes?
Onions do not eliminate pests entirely, but their sulfur smell repels spider mites, aphids, and some beetles. They work best as part of a broader pest management approach that includes removing affected leaves, checking plants regularly, and using organic sprays if infestations become severe. Companion planting reduces pest pressure but does not replace monitoring.
Can I plant onion sets and tomato transplants on the same day?
Yes. Both are ready to go into the ground at the same time in spring. Onion sets go in about 1 inch deep, 4 to 6 inches apart. Tomato transplants go in deeper — bury the stem up to the first true leaves — and space them 24 to 36 inches apart. Water both when ready after planting.
What if my onions start to bulge and push against the tomato plant?
Harvest them. Onion bulbs that are expanding are ready to pull. Do not wait for them to fully mature in the ground if they are crowding nearby plants. Once harvested, cure them in a warm, dry place for two to three weeks before storing.
Will onion smell affect the taste of my tomatoes?
No. The sulfur compounds that onions release stay in the soil and air around the plants. They do not transfer into the tomato fruit or change its flavor. The two crops remain separate in taste even when grown side by side.