Companion plants that grow well with tomatoes and peppers
Tomatoes and peppers thrive when planted near basil, carrots, onions, and marigolds. These companions either repel pests that target your main crops, improve soil nutrients, or straightforward use different soil depths so they do not compete for water and food. Basil in particular repels spider mites and whiteflies that damage both tomatoes and peppers, while marigolds deter nematodes — tiny soil pests that feed on roots.
The best companions are plants that mature at different times or occupy different vertical space. Carrots and onions stay low and pull nutrients from deeper soil layers, leaving the upper soil for tomato and pepper roots. Basil grows to medium height and does not shade your main plants if you space them correctly. Lettuce and spinach work as ground cover beneath tomatoes, shading the soil to keep it cooler and retain moisture during hot months.
Parsley, cilantro, and dill also grow well alongside tomatoes and peppers. These herbs attract beneficial insects — parasitic wasps and hoverflies — that eat aphids and other soft-bodied pests. Plant them at the edges of your tomato and pepper beds rather than directly underneath, so they do not compete for light.
Key Takeaways
- Basil repels spider mites and whiteflies while improving the flavor of nearby tomatoes, and should be planted within one foot of your tomato stems.
- Marigolds deter root nematodes and are inexpensive to start from seed, making them a low-cost pest barrier around pepper plants.
- Carrots and onions occupy lower soil layers and do not compete with tomato and pepper roots for water and nutrients.
- Herbs like parsley, cilantro, and dill attract beneficial insects that prey on common tomato and pepper pests like aphids.
- Avoid planting brassicas (cabbage, broccoli, kale) and fennel near tomatoes and peppers, as they inhibit growth or attract the same pests.
Plants to avoid near tomatoes and peppers
Do not plant fennel, cabbage, broccoli, or kale within three feet of tomatoes or peppers. Fennel releases compounds into the soil that slow the growth of nearby plants. Brassicas like cabbage and broccoli attract the same cabbage moths and flea beetles that can damage pepper foliage, so planting them together concentrates pest pressure rather than spreading it.
Potatoes and tomatoes are both nightshades and share the same pests and diseases — particularly early blight and late blight. Plant potatoes in a separate bed at least four feet away. Corn and tomatoes compete heavily for nitrogen, and corn can shade tomatoes if planted on the north side of your garden.
How to space companion plants with tomatoes
Space basil six to eight inches away from the base of each tomato plant. Basil grows quickly and will fill the gap within two to three weeks. If you are growing determinate tomatoes (bush types that stay compact), you can plant basil closer — four to six inches — because the plant will not grow as tall or wide.
Plant marigolds around the perimeter of your tomato and pepper bed, spacing them twelve inches apart. They do not need to touch your main plants to work; the root compounds that repel nematodes spread through the soil. Carrots and onions can be planted in rows between tomato plants, spaced four inches apart for carrots and six inches for onions.
Lettuce and spinach should be planted directly beneath tomato plants once the tomato is at least twelve inches tall and has developed its first true leaves. This timing prevents the seedlings from being shaded before they establish. Space lettuce plants six inches apart and thin spinach to four inches once it sprouts.
Timing: when to plant companions with tomatoes and peppers
Plant basil at the same time you transplant tomatoes and peppers into the garden, or wait until soil temperature reaches 60 degrees Fahrenheit if you are direct-seeding basil. Basil grows slowly in cold soil and may rot before it sprouts. If you start basil indoors in pots, transplant it outside one to two weeks after your tomatoes go in the ground.
Marigolds can go in the ground at the same time as tomatoes and peppers. They germinate in cool soil and flower within six to eight weeks. Carrots and onions should be planted two to three weeks before tomatoes if you want them to establish roots before the larger plants shade them. If you plant them at the same time, thin them more aggressively so they do not compete during the critical first month.
Lettuce and spinach are cool-season crops and will bolt (flower and become bitter) in midsummer heat. Plant them in spring alongside early tomato varieties, or wait until late summer when temperatures drop below 75 degrees Fahrenheit. In hot climates, skip them during peak summer and focus on basil and marigolds instead.
Pest control benefits of companion planting
Basil contains volatile oils that repel spider mites, whiteflies, and some aphids. The smell is strongest when you brush the leaves, so planting basil close enough to touch when you work in the garden amplifies the effect. Marigolds produce compounds in their roots and leaves that deter root-knot nematodes, which are particularly damaging to peppers in warm climates.
Parsley, dill, and cilantro attract parasitic wasps and hoverflies. These beneficial insects lay eggs on aphids and other soft-bodied pests; the larvae then feed on the pest. The wasps are tiny and harmless to humans but highly effective at controlling pest populations before they explode. Plant these herbs in clusters of three to five plants rather than single plants scattered around, so the insects have enough food to establish a population.
Onions and garlic repel spider mites and some beetles through sulfur compounds in their bulbs. They are less dramatic than basil but provide steady, background protection. Carrots do not directly repel pests but their fine root structure helps break up compacted soil, improving drainage and root health for tomatoes and peppers.
Soil and nutrient considerations
Tomatoes and peppers are heavy feeders and deplete nitrogen quickly. Planting nitrogen-fixing legumes like beans or peas nearby can help, but they grow tall and may shade your main plants. A better approach is to plant shallow-rooted herbs and vegetables that use different soil layers. Basil, lettuce, and spinach feed in the top two to four inches of soil, while tomato and pepper roots go deeper.
Carrots and onions pull nutrients from six to twelve inches down, leaving the shallow layer for herbs and the deep layer for tomatoes and peppers. This vertical separation means all three groups can grow in the same bed without competing. Add two to three inches of compost to your tomato and pepper bed before planting to may support enough nutrients for both your main crops and their companions.
Marigolds actually improve soil structure over time. As they decompose at the end of the season, they add organic matter that helps soil retain moisture and nutrients. Leave marigold plants in the ground after frost kills them, or chop them up and work them into the soil for the next season.
Container growing with companion plants
If you are growing tomatoes and peppers in pots, basil works well in the same container if the pot is at least eighteen inches wide and deep. Plant the tomato or pepper in the center and basil around the edge. Water more frequently in containers because soil dries faster, and both plants prefer consistent moisture.
For smaller pots (twelve inches wide), grow basil in a separate pot next to your tomato or pepper. This gives each plant enough root space and makes watering easier — basil prefers slightly drier soil than tomatoes. Marigolds can share a large container with peppers but should have their own pot if space is tight.
Lettuce and spinach are not practical in the same container as tomatoes or peppers because they need regular harvesting and frequent watering that differs from your main crop's schedule. Grow them in a separate shallow container (six inches deep) near your tomato and pepper pots.
Frequently Asked Questions
Can I plant basil and tomatoes in the same pot?
Yes, if the pot is at least eighteen inches wide and deep. Plant the tomato in the center and basil around the edge, spacing them four to six inches apart. Water regularly because container soil dries faster than garden soil. Pinch off basil leaves as it grows to encourage bushiness and prevent it from shading the tomato.
Do I need to plant companions to grow tomatoes and peppers successfully?
No, but companions reduce pest pressure and improve soil health. Tomatoes and peppers grow fine alone if you manage pests with other methods and add compost or fertilizer. Companions straightforward make the work easier and often produce food or flowers of their own.
What if I plant tomatoes and peppers together — do they need different companions?
They can share the same companions. Basil, marigolds, carrots, and onions work well with both. The main difference is that peppers prefer slightly drier soil than tomatoes, so if you are watering for tomatoes, make sure the pepper soil drains well and does not stay soggy.
Can I plant garlic with tomatoes and peppers?
Yes, garlic repels spider mites and some beetles. Plant garlic cloves in fall for spring harvest, spacing them six inches apart around the edge of your tomato and pepper bed. Garlic matures in late spring or early summer, so it will not compete with your tomatoes and peppers during their peak growing season.
What should I do with companion plants after I harvest tomatoes and peppers?
Leave basil, parsley, and other herbs in the ground until frost kills them, then chop them up and work them into the soil to add organic matter. Pull carrots and onions when they reach eating size. Marigolds can stay until frost or be removed earlier if they become too large and shade your tomatoes.