Companion planting is the practice of growing certain plants together to create mutually beneficial relationships in the garden. When it comes to tomatoes — the most popular homegrown vegetable — choosing the right companions can naturally repel destructive pests, attract beneficial pollinators, improve soil health, and even enhance the flavor of your harvest. The wrong neighbors, however, can stunt growth, attract shared pests, or compete for the same nutrients.
Best Companion Plants for Tomatoes
Basil
Basil is the classic tomato companion and for good reason. Research suggests that basil planted near tomatoes may help repel aphids, whiteflies, tomato hornworms, and mosquitoes through its strong aromatic oils. Some gardeners believe basil actually improves the flavor of nearby tomatoes, though this has not been scientifically proven. Regardless, basil and tomatoes have similar growing requirements — full sun, warm temperatures, consistent moisture — making them ideal bed partners. Plant basil 12 to 18 inches from your tomato plants on the sunny side.
Marigolds
French marigolds are one of the most well-researched companion plants in horticulture. Their roots release alpha-terthienyl, a compound that kills root-knot nematodes — microscopic worms that attack tomato roots and cause stunted, unproductive plants. Marigolds also repel aphids and whiteflies above ground while attracting beneficial hoverflies that prey on garden pests. Plant a ring of marigolds around your tomato bed or tuck them between plants for season-long pest protection.
Carrots
Carrots make excellent tomato companions because they occupy different soil layers — carrots grow deep while tomato roots spread wide and shallow. Planting carrots around tomato plants loosens and aerates the surrounding soil, improving water infiltration and root development. Carrots also benefit from the shade provided by tomato foliage during hot summer months, which prevents their roots from becoming bitter.
Garlic and Chives
Alliums — garlic, chives, onions, and leeks — are excellent tomato companions. Their strong sulfur compounds repel aphids, spider mites, and Japanese beetles. Garlic sprayed as a foliar treatment has even been shown to help prevent late blight on tomato foliage. Plant garlic cloves or chive plants between tomato rows or around the perimeter of your tomato bed.
Nasturtiums
Nasturtiums serve as a trap crop — aphids, whiteflies, and flea beetles preferentially attack nasturtiums over tomatoes, drawing these pests away from your valuable crop. Plant nasturtiums at the edges of your tomato bed where they can intercept pests before they reach your tomatoes. As a bonus, nasturtium flowers and leaves are edible, adding a peppery kick to salads.
Borage
Borage is a magnet for pollinators, attracting bees and other beneficial insects that improve tomato fruit set. It is also reported to repel tomato hornworms and improve the overall health and flavor of nearby tomatoes. Borage is a vigorous self-seeder, so plant it where you do not mind it returning year after year.
Lettuce and Spinach
Low-growing leafy greens like lettuce and spinach make excellent living mulch beneath tomato plants. They shade the soil, retain moisture, and suppress weeds while benefiting from the overhead shade of the tomato canopy. This is particularly useful in hot climates where lettuce would bolt quickly in full sun. Plant shade-loving greens on the north side of your tomato cages.
Peppers
Tomatoes and peppers are both nightshade family members with similar growing needs. They do well together as long as you rotate the entire nightshade section of your garden annually to prevent soil-borne disease buildup. Interplanting hot peppers with tomatoes may help deter some pests due to the capsaicin in hot pepper foliage.
Plants to Keep Away from Tomatoes
Brassicas (Cabbage, Broccoli, Cauliflower)
Brassicas are heavy feeders that compete with tomatoes for the same soil nutrients, particularly nitrogen and calcium. They can also stunt tomato growth. Keep brassicas in a separate bed at least 4 feet from your tomatoes.
Fennel
Fennel is allelopathic — it releases chemicals into the soil that inhibit the growth of most nearby plants, including tomatoes. Fennel should be grown in isolation, far from your main vegetable beds.
Corn
Corn and tomatoes share a devastating pest — the corn earworm is the same species as the tomato fruitworm (Helicoverpa zea). Planting them near each other increases the pest pressure on both crops. Keep corn and tomatoes in separate areas of the garden.
Potatoes
Both tomatoes and potatoes are susceptible to early blight and late blight. Planting them together or in the same area increases the chance that both crops will be infected. They also compete for the same nutrients. Keep them in separate beds and rotate their locations each year.
Dill (When Mature)
Young dill is actually a good tomato companion — it attracts beneficial predatory wasps that eat hornworm caterpillars. However, mature dill produces compounds that can inhibit tomato growth. If you plant dill near tomatoes, harvest it before it goes to seed or replace it with fresh dill plantings throughout the season.
Companion Planting Layout
For a companion-planted tomato bed, try this layout: place tomato plants in the center with 24-inch spacing. Plant basil between each tomato plant. Ring the outside of the bed with marigolds. Interplant carrots and lettuce as ground cover beneath the tomato canopy. Add a few borage and nasturtium plants at the corners. Place garlic or chive clumps at each end of the bed. This creates a diverse, pest-resistant ecosystem that requires far fewer interventions than a monoculture tomato bed.
Frequently Asked Questions
Does companion planting really work?
Some companion planting claims are backed by solid scientific research — particularly marigolds for nematode control and trap cropping with nasturtiums. Other traditional pairings are based on generations of gardener observation rather than controlled studies. Even where the science is limited, companion planting increases biodiversity in your garden, which naturally reduces pest pressure and creates a more resilient growing system.
Can I grow tomatoes near cucumbers?
Yes, tomatoes and cucumbers grow well together. They have different rooting depths and do not compete significantly. Train cucumbers on a trellis near your tomato cages for efficient use of space. Just make sure both get adequate airflow to prevent fungal diseases.

