Yes, tomatoes and onions grow well as companion plants
Tomatoes and onions can be planted together in the same bed or garden space. Onions actually help tomatoes by repelling some common pests, and the two plants have different root depths, so they do not compete heavily for water and nutrients. Onions grow shallow roots near the soil surface, while tomato roots reach deeper into the ground. This means you can plant onions around the base of tomato plants or in the same row without either plant suffering.
The main reason gardeners pair these two is pest control. Onions release a sulfur compound that deters spider mites, aphids, and some beetles—all insects that feed on tomato leaves and fruit. Neither plant produces toxins that harm the other, and neither requires such different soil conditions that you need to amend the bed twice. You can treat the whole space as one garden area.
Key Takeaways
- Onions and tomatoes have different root depths, so they do not compete for the same water and nutrients in the soil.
- Onions release a natural odor that repels spider mites, aphids, and beetles that commonly damage tomato plants.
- Plant onions around the base of tomato plants or in the same row, spacing onions 4 to 6 inches apart.
- Both plants prefer full sun and well-draining soil, so the same bed conditions work for both.
- Harvest onions when their tops fall over, usually 90 to 120 days after planting, without disturbing nearby tomato roots.
How to space tomatoes and onions in the same bed
Plant tomato seedlings or transplants first, spacing them 24 to 36 inches apart depending on the variety. Determinate (bush) tomatoes can be closer; indeterminate (vining) tomatoes need more room. Once your tomatoes are in the ground and have grown a few inches, plant onion sets or seedlings around them.
Place onions 4 to 6 inches away from the tomato stem, in a circle around the base if you like, or in a line between tomato plants. Onion sets (the small bulbs you buy) go in the ground pointed end up, about 1 inch deep. Space them 4 to 6 inches apart in all directions. If you are planting onion seedlings instead, bury them so the soil line matches where it was in their container, and space them the same distance apart.
The shallow onion roots will not interfere with the deeper tomato roots. Both plants need full sun—at least 6 to 8 hours per day—so choose a bed that gets consistent light. Water the bed evenly; onions prefer slightly drier soil than tomatoes, but in a shared bed you will water once and both will receive moisture. Adjust your watering schedule so the soil stays moist but not soggy for the tomatoes while the onions do not sit in standing water.
Soil and fertilizer for both plants
Tomatoes and onions both prefer well-draining soil rich in organic matter. Before planting, work 2 to 3 inches of compost or aged manure into the top 8 to 10 inches of soil. This improves drainage and adds nutrients both plants need. Test your soil pH if you can; both tomatoes and onions do best in soil between 6.0 and 7.0.
Tomatoes are heavier feeders than onions, so they will use more nitrogen and potassium as they grow. You can fertilize the whole bed with a balanced fertilizer (like 10-10-10) when you plant, then switch to a tomato-specific fertilizer once the tomato plants flower. Onions do not need extra feeding once they are established. If you use a slow-release fertilizer at planting time, it will feed both plants throughout the season without requiring mid-season adjustments.
Pest and disease benefits of planting them together
The sulfur smell onions release naturally repels spider mites, which are a major tomato pest in warm, dry weather. Onions also deter some aphid species and beetles that chew tomato leaves. This does not mean you will never see pests, but the onion smell reduces the number of insects that land on your tomato plants in the first place.
Onions do not prevent fungal diseases like early blight or late blight, which spread through water and air. If your tomatoes develop these diseases, the onions nearby will not stop it. However, the improved air circulation around the base of the tomato plant (because onions are low-growing) can help reduce humidity and slow fungal spread. Plant onions far enough from the stem so water and air can move freely around the tomato's lower leaves.
When to harvest onions without damaging tomatoes
Onions mature in 90 to 120 days, depending on the variety and your climate. You will know they are ready when the tops fall over and turn brown. At that point, stop watering and let the soil dry out slightly for a week or two. This hardens the onion skin and helps them store longer.
Dig onions carefully with a garden fork or trowel, working from the side rather than pulling straight up. Pulling can disturb the tomato roots nearby, especially if the onions are planted close. Once you have harvested the onions, leave the soil in place around the tomato plants. The space where onions grew will not harm the tomatoes, and you can plant new onions there next season if you rotate crops.
Let harvested onions cure in a warm, dry, well-ventilated spot for 2 to 3 weeks before storing. Do not wash them; just brush off loose soil. Cured onions store for several months in a cool, dark place.
Other plants that grow well with tomatoes
If you want to expand your companion planting, basil is another excellent choice alongside tomatoes and onions. Basil repels flies and mosquitoes, and many gardeners plant it right next to tomato stems. Carrots also pair well with tomatoes because they have even shallower roots than onions and do not compete for nutrients.
Avoid planting brassicas (cabbage, broccoli, kale) near tomatoes; they attract different pests and can create a pest-heavy environment. Fennel and dill can stunt tomato growth, so keep those away. Potatoes are susceptible to the same late blight disease as tomatoes, so planting them together increases the risk that disease will spread between the two crops.
Common mistakes when planting tomatoes and onions together
The most common error is planting onions too close to the tomato stem. If onions are right against the stem, you cannot water the base of the tomato without wetting the onion foliage, which can encourage mildew. Leave at least 4 inches of space. Another mistake is overwatering the bed because tomatoes need more water than onions. If the soil stays soggy, onion bulbs may rot. Water deeply but less frequently, and let the top inch of soil dry out between waterings.
Some gardeners plant onions at the same time as tomato transplants, which can work but is harder to manage. Onions grow slowly at first, and if you water heavily for the young tomatoes, the onions may sit in too much moisture. Waiting until your tomato plants are 4 to 6 inches tall before planting onions gives you better control over watering and reduces the risk of onion rot.
Frequently Asked Questions
Can I plant onion seeds directly in the ground with tomatoes?
Yes, but onion seeds are slow to germinate and grow. They take 7 to 10 days to sprout and several weeks to reach transplant size. Most gardeners start onion seeds indoors 8 to 10 weeks before the last frost, then plant the seedlings outside. Onion sets (small bulbs) are faster and easier if you are planting alongside established tomatoes.
Will onions make my tomatoes taste like onions?
No. Flavor in tomatoes comes from the plant's genetics, soil nutrients, and sunlight, not from nearby plants. Onions and tomatoes are separate plants with separate root systems, so growing them together does not transfer flavor between them. Your tomatoes will taste like tomatoes.
What if I plant onions after my tomatoes are already flowering?
You can still plant onions, but they may not have enough time to mature before frost if you live in a short-season climate. Onions need 90 to 120 days to reach harvest size. If you have fewer than 90 days left in your growing season, plant them anyway for the pest-repelling benefit, or harvest them early as green onions (scallions) instead of waiting for full bulbs to form.
Do I need to fertilize onions separately from tomatoes?
No. A single balanced fertilizer applied at planting time will feed both plants. Tomatoes will use more nutrients as they grow, so you may add a tomato-specific fertilizer later, but onions do not require separate feeding. If you use a slow-release fertilizer, it will supply both plants throughout the season.
Can I plant tomatoes and onions in containers together?
Yes, but use a large container—at least 5 gallons for one tomato plant and 2 to 3 onions. The tomato needs depth for its roots, and the onions need space to develop bulbs without crowding. Use high-quality potting soil, not garden soil, and may support the container has drainage holes. Water more frequently in containers than in ground beds because soil dries out faster.