Tomatoes grow best with plants that don't compete for space or nutrients
Basil, carrots, onions, and marigolds are the strongest companions for tomatoes in a raised bed. These plants either improve soil conditions, repel pests that target tomatoes, or use different soil depths so they don't fight for the same resources. Basil in particular has a reputation for enhancing tomato flavor, though the real benefit is that it attracts pollinators and repels spider mites and whiteflies—both common tomato pests.
The key to companion planting in a raised bed is understanding what each plant needs. Tomatoes are heavy feeders that pull nitrogen from soil and need full sun. Good companions either fix nitrogen back into the soil, occupy a different vertical space, or draw pests away from the tomato plant itself. Poor companions are those that compete for the same nutrients, shade the tomato, or attract the same pests.
Key Takeaways
- Basil, parsley, and borage repel common tomato pests like spider mites and whiteflies while attracting pollinators.
- Root vegetables like carrots and radishes grow below tomato roots and don't compete for the same soil nutrients.
- Onions and garlic deter aphids and spider mites, two pests that damage tomato leaves and fruit.
- Marigolds trap pests meant for tomatoes and can be pulled up and composted at season's end to add organic matter back to the bed.
- Avoid planting brassicas (cabbage, broccoli), fennel, and potatoes near tomatoes because they compete for nitrogen or attract overlapping pests.
Herbs that repel tomato pests and attract pollinators
Basil is the most popular tomato companion because it thrives in the same warm conditions and its strong scent masks the tomato plant from pests. Plant basil 6 to 12 inches away from the tomato stem so it gets sun but doesn't shade the lower leaves. Pinch off basil flowers as they appear to keep the plant bushy and productive—this also prevents it from going to seed and taking energy away from leaf growth.
Parsley and borage work similarly. Both attract hoverflies and parasitic wasps, which lay eggs in aphids and spider mites. Borage has the added benefit of deep roots that bring up minerals from lower soil layers, making them available to shallower-rooted plants. Plant borage at the edge of the bed where it can sprawl without shading the tomato. Parsley stays compact and can be planted closer to the tomato stem—about 8 inches away.
Cilantro is another option, though it bolts quickly in heat. If you live in a warm climate, plant cilantro early in the season and replace it with basil once temperatures climb above 75°F. In cooler regions, cilantro can grow alongside tomatoes for most of the season.
Root vegetables that use different soil layers
Carrots and radishes grow downward while tomatoes grow upward and outward, so they occupy different zones in the raised bed. This means they don't compete for nitrogen or phosphorus. Plant carrots 3 to 4 inches away from the tomato stem and thin seedlings as they grow so each carrot has room to develop. Radishes mature in 25 to 30 days, so you can plant them early in the season, harvest them before the tomato plant gets large, and replant a second crop if you want.
Beets also work well for the same reason—their roots go deep and their leaves stay low. Plant beets 4 inches from the tomato stem. Turnips are another option, though they take longer to mature (60 to 80 days) and their leaves can get large enough to shade the tomato if the bed is crowded.
Onions and garlic for pest control
Onions and garlic repel spider mites, aphids, and some fungal diseases through their sulfur compounds. Plant onion sets or garlic cloves 6 inches away from the tomato stem. Garlic is typically planted in fall and harvested in early summer, so it occupies the bed before tomatoes go in. Onions can be planted in spring at the same time as tomatoes and harvested in mid to late summer as the tomato plant is producing fruit.
Green onions (scallions) are a faster alternative if you want onion benefits without waiting months for bulbs to form. They mature in 60 days and can be harvested as needed. Plant them 4 inches from the tomato stem and thin seedlings to 2 inches apart.
Flowers that trap pests and add color
Marigolds are often planted as "trap crops"—pests like spider mites and whiteflies prefer marigolds to tomatoes, so they feed on the marigold instead. Plant marigolds around the perimeter of the bed or interspersed between tomato plants, about 12 inches away from the stem. At the end of the season, pull up the marigolds (pests and all) and compost them. The decaying plant matter adds organic material back to the bed.
Nasturtiums work the same way and have the added benefit of being edible—the flowers and leaves have a peppery taste and can be added to salads. Plant nasturtiums at the edge of the bed where they can trail without shading the tomato. They prefer cooler weather, so they're most productive in spring and fall.
Calendula (pot marigold) attracts beneficial insects and repels some pests. It's less aggressive than nasturtium and takes up less space, making it a good choice for smaller raised beds. Plant it 8 to 10 inches from the tomato stem.
Plants to avoid near tomatoes
Brassicas—cabbage, broccoli, cauliflower, and kale—compete with tomatoes for nitrogen and can stunt both plants. They also attract some overlapping pests. Keep them in a separate bed or at least 2 feet away from tomatoes.
Fennel releases compounds that inhibit the growth of nearby plants, including tomatoes. Avoid planting it anywhere in the raised bed. Potatoes are susceptible to early blight, a fungal disease that also affects tomatoes. If you grow potatoes in one bed, don't plant tomatoes there the following year—rotate to a different location.
Corn and tomatoes compete for nitrogen and space. If your raised bed is small (less than 4 feet by 8 feet), skip corn and choose a lighter feeder instead. Dill can attract hornworms, which are one of the most destructive tomato pests, so it's best avoided in a tomato bed.
Spacing and timing for a crowded raised bed
A standard 4-by-8-foot raised bed can hold 2 to 3 tomato plants depending on variety. Determinate (bush) tomatoes need less space than indeterminate (vining) types. Once you've placed the tomatoes, you have roughly 20 to 24 square feet of remaining space for companions.
Plant fast-growing companions like radishes and lettuce early in the season so they mature and are harvested before the tomato plant gets large and shades them. Plant slower companions like carrots and onions at the same time as the tomatoes so they have the full season to develop. Herbs like basil can be planted after the last frost date, once soil has warmed—basil won't grow in cold soil and will rot if planted too early.
Stagger plantings of quick crops. If you plant radishes in early spring, harvest them 4 weeks later, and replant with a second crop of radishes or lettuce, you can get two harvests from the same space before the tomato plant needs the room.
Frequently Asked Questions
Can I plant lettuce and spinach with tomatoes?
Yes. Both are light feeders and prefer partial shade, which the tomato plant provides as it grows. Plant them on the north side of the tomato (the shadier side) and harvest them before the tomato canopy gets too dense. They'll mature in 30 to 45 days, so you can get a full crop before the tomato plant shades them out completely.
Will basil really make my tomatoes taste better?
Basil doesn't chemically improve tomato flavor, but it does attract pollinators and repel pests that damage fruit. A healthier tomato plant with fewer pest holes and better pollination will produce better-tasting fruit. The real benefit is pest control and pollinator activity, not a direct flavor transfer.
What if I plant companions too close to the tomato?
Crowding reduces air circulation around the tomato plant, which increases the risk of fungal diseases like early blight and powdery mildew. It also forces roots to compete for water and nutrients. Follow spacing guidelines—usually 6 to 12 inches from the tomato stem—and thin seedlings as they grow so each plant has room to develop.
Can I plant tomatoes and peppers together?
Yes, they're compatible. Both like warm soil, full sun, and similar nutrients. They don't compete aggressively and aren't susceptible to the same pests. Plant them at least 12 inches apart so both get adequate light and air circulation.
Should I remove companion plants when the tomato plant gets large?
Remove them if they're being shaded or if they're competing for water during hot weather. Fast-growing crops like radishes and lettuce will naturally finish before the tomato plant gets large. Herbs like basil can stay all season if they're getting enough light. Check soil moisture regularly in mid to late summer—a crowded bed dries out faster than one with just tomatoes.