Tomatoes grow best with plants that don't compete for space or nutrients
The plants that work well alongside tomatoes are ones that either occupy a different layer of the bed, draw nutrients from different soil depths, or actively repel the pests that target tomatoes. Basil is the classic pairing—it grows low while tomatoes grow tall, and it repels spider mites and whiteflies. Carrots, beets, and onions stay underground and won't shade your tomatoes. Marigolds flower at ground level and deter nematodes that damage tomato roots. Parsley and cilantro grow as low herbs without competing for light.
The plants to avoid are those that need the same nutrients at the same time, or that attract the same pests. Don't plant brassicas (cabbage, broccoli, kale) in the same bed—they and tomatoes both draw heavily on nitrogen and potassium. Fennel releases a chemical that stunts tomato growth. Corn and potatoes are susceptible to the same diseases tomatoes catch, so they spread infection if planted nearby.
Key Takeaways
- Basil, carrots, onions, and marigolds are safe companions that won't compete with tomatoes for light, water, or nutrients.
- Low-growing herbs like parsley and cilantro can share a bed with tomatoes because they don't shade the plants or draw from the same soil layer.
- Avoid brassicas, fennel, corn, and potatoes in the same raised bed, as they compete for nutrients or spread disease to tomatoes.
- Companion plants work best when you space them so tomatoes still get six to eight hours of direct sun and air can flow around all the plants.
Herbs that grow low and repel tomato pests
Basil is the most reliable companion. It grows 12 to 18 inches tall and stays bushy at the base, so it won't shade tomato stems. Basil repels spider mites, whiteflies, and hornworms—three of the most common tomato pests. Plant it at the edge of the bed or between tomato plants, and pinch off the flower buds to keep it from going to seed and taking energy away from leaf growth.
Parsley and cilantro both stay under 12 inches tall and have fine foliage that doesn't block light. Parsley takes two to three weeks to sprout, so soak the seeds overnight before planting. Cilantro bolts quickly in heat, so plant it early in the season or in a spot that gets afternoon shade from the tomato plants themselves. Both attract beneficial insects that prey on aphids and mites.
Oregano and thyme are woody herbs that stay compact and actually improve in flavor when grown near tomatoes. They need less water than tomatoes, so plant them at the edge of the bed where you can water them separately if needed. These herbs also attract pollinators and beneficial wasps.
Root vegetables that don't compete for space
Carrots and beets grow downward while tomatoes grow upward, so they occupy different zones of the bed. Carrots need loose, well-draining soil and won't compete with tomato roots for nutrients because they draw from deeper layers. Thin carrot seedlings to 2 inches apart so they have room to develop. Beets are more forgiving—they tolerate crowding better and can be harvested early as baby beets if space gets tight.
Onions and garlic are also underground growers. Onions repel spider mites and some fungal diseases. Plant onion sets (small bulbs) 4 to 6 inches apart around the edge of the bed. Garlic takes a full season to mature, so plant it in fall if you're in a cold climate, or in early spring if you're in a warm one. Both onions and garlic actually improve tomato flavor when grown nearby.
Radishes mature in 25 to 30 days, so you can plant them early and harvest them before they take up much space. They break up compacted soil and attract beneficial insects. Sow them in early spring and again in late summer for a fall crop.
Flowers that protect tomato roots and attract pollinators
Marigolds are the most effective pest deterrent you can plant. They release a chemical into the soil that repels root-knot nematodes, which burrow into tomato roots and stunt growth. Plant marigolds around the perimeter of the bed or between tomato plants. They flower continuously from early summer until frost and need almost no maintenance. Deadhead spent flowers to encourage more blooms.
Nasturtiums act as a trap crop—pests like aphids prefer them to tomatoes, so the insects congregate on the nasturtiums instead. Plant them at the edge of the bed where you can see them easily. They also have edible flowers and leaves. Nasturtiums sprawl, so give them room or train them up a trellis.
Borage is a tall herb with blue flowers that attract bees and other pollinators. It grows 2 to 3 feet tall, so plant it on the north side of the bed so it doesn't shade the tomatoes. Bees pollinate tomato flowers, which means more fruit. Borage also repels hornworms.
How to arrange companions in a raised bed
Tomatoes need six to eight hours of direct sun, so place them where they'll get the most light. Plant tall companions like borage or basil on the north side of the bed so their shade falls away from the tomatoes. Plant low herbs like parsley and thyme at the edges, where they won't be shaded by tomato foliage as it grows.
Space tomato plants 24 to 36 inches apart, depending on the variety. Determinate (bush) tomatoes need less space than indeterminate (vining) ones. Use the space between tomato plants for carrots, beets, and onions. Plant basil and marigolds in the gaps as well. Leave at least 6 inches between any two plants so air can flow around them—good air circulation prevents fungal disease.
Water deeply once or twice a week rather than daily. Tomatoes, basil, and most herbs prefer consistent moisture. Carrots, beets, and onions tolerate drier soil, so if you're watering for the tomatoes, the root vegetables will be fine. Marigolds actually prefer drier soil, so plant them where water drains fastest.
Plants to keep out of a tomato bed
Brassicas (cabbage, broccoli, kale, Brussels sprouts) compete with tomatoes for nitrogen and potassium. Both crops are heavy feeders, so planting them together depletes the soil quickly and stunts both plants. If you want to grow brassicas, use a separate bed or plant them in a different season.
Fennel releases allelopathic compounds—chemicals that inhibit the growth of nearby plants. Tomatoes are especially sensitive to fennel. Keep fennel in a container or a separate bed entirely.
Corn and potatoes are susceptible to many of the same diseases as tomatoes, including early blight and late blight. Growing them in the same bed increases the risk that disease will spread from one crop to the other. Rotate these crops to different beds each year.
Cabbage moths and tomato hornworms are different pests, but brassicas attract cabbage moths, which lay eggs nearby. If you're trying to keep hornworms down, avoid planting brassicas close to tomatoes.
Timing and succession planting with tomatoes
Tomatoes don't produce until mid-summer in most climates, so the space around them is empty for the first two months. Use that time to grow fast crops. Plant radishes, spinach, and lettuce in spring, harvest them by early summer, and then plant basil and marigolds in the space they leave behind. This way you get two harvests from the same bed.
Cilantro and parsley bolt in heat, so plant them in early spring and again in late summer when temperatures cool. Carrots and beets can be planted in spring and again in midsummer for a fall harvest. Onions planted in spring mature by late summer. Plan your planting calendar so that fast crops finish before they compete with tomatoes for light and water.
Frequently Asked Questions
Can I plant lettuce or spinach under tomato plants?
Yes, early in the season. Lettuce and spinach mature in 30 to 45 days, so plant them in spring and harvest them before tomato foliage gets dense. Once the tomato canopy fills in, the shade will prevent lettuce from forming heads. By then you'll have already harvested it.
Will basil really keep pests off my tomatoes?
Basil repels spider mites, whiteflies, and some other insects, but it won't eliminate pests entirely. It reduces pest pressure and makes your tomatoes less attractive to certain insects. For severe infestations, you'll still need to scout plants and remove pests by hand or use other methods.
How close can I plant basil to tomatoes?
Plant basil 6 to 12 inches away from the tomato stem. Basil grows outward as well as upward, so give it room to spread. If you plant it too close, it will shade the lower tomato stem and reduce air circulation, which invites fungal disease.
What if my raised bed is only 2 feet wide?
In a narrow bed, plant one tomato plant per 2 feet of length, and fill the remaining space with low herbs and root vegetables. Skip tall companions like borage or corn. Basil, parsley, carrots, and onions all work in tight spaces as long as you space them so air can flow.
Can I plant tomatoes with beans?
Yes. Beans fix nitrogen in the soil, which tomatoes need, so they're actually beneficial neighbors. Plant pole beans on a trellis on the north side of the bed so they don't shade tomatoes. Bush beans stay low and won't compete for light. Both grow well with tomatoes.