Plant basil, carrots, and marigolds near tomatoes to improve growth and reduce pests
The plants you grow next to tomatoes affect how well they produce, how healthy they stay, and which insects visit your garden. Some plants repel the pests that damage tomatoes—like hornworms and whiteflies. Others improve soil nutrients or shade the roots on hot days. A few actually compete with tomatoes for water and nutrients and should stay in a different bed.
The best companions are basil (which repels flies and improves flavor), carrots (which loosen soil without competing for nutrients), marigolds (which deter harmful insects), and parsley (which attracts beneficial wasps). Nasturtiums act as a trap crop—pests eat them instead of your tomatoes. Borage brings pollinators. Each one solves a real problem in a tomato bed, so you can choose based on what your garden actually needs.
Key Takeaways
- Basil planted 12 inches from tomato stems repels whiteflies and spider mites while improving the flavor of both plants.
- Marigolds and nasturtiums draw pests away from tomatoes—nasturtiums especially act as a sacrificial crop that insects prefer to eat.
- Carrots, parsley, and borage do not compete with tomatoes for water or nutrients and add benefits like loose soil or pollinator attraction.
- Avoid planting brassicas (cabbage, broccoli), fennel, and potatoes within three feet of tomatoes because they compete for the same nutrients or harbor shared pests.
- Space companion plants far enough apart that leaves do not touch when both are mature, so air flows freely and disease spreads less easily.
Basil: The Flavor and Pest-Control Companion
Basil is the most useful tomato companion because it repels whiteflies, spider mites, and some hornworm moths while also improving the taste of tomatoes grown nearby. Plant basil 12 to 18 inches away from the tomato stem, in the same soil and watering schedule. Both plants thrive in full sun and warm soil, so they share the same growing conditions without competing.
Pinch off basil flowers as they appear so the plant puts energy into leaves instead of seeds. This also keeps basil from self-seeding all over your bed. Harvest basil leaves regularly—the more you pick, the bushier the plant grows. If you grow basil in containers near tomatoes instead of in the ground, you can move it indoors before frost and extend your harvest into fall.
Marigolds and Nasturtiums: Pest Deterrents and Trap Crops
Marigolds release a scent that repels spider mites, whiteflies, and some beetles. Plant them around the edge of your tomato bed, about 12 inches from the tomato stems. They need less water than tomatoes, so water them separately or plant them slightly uphill so excess tomato water does not pool around their roots.
Nasturtiums work differently—they attract aphids, whiteflies, and hornworms away from tomatoes by being more appealing to eat. Plant nasturtiums on the outer edge of your bed as a sacrificial crop. The pests will feed on the nasturtiums instead of your tomatoes. You may see damaged nasturtium leaves while your tomatoes stay clean. This is the strategy working as intended. Both marigolds and nasturtiums flower all season, so they add color while protecting your crop.
Carrots, Parsley, and Borage: Soil and Pollinator Support
Carrots loosen compacted soil as their roots push down, which helps tomato roots penetrate deeper and access water during dry spells. Carrots do not compete with tomatoes for nitrogen because they pull nutrients from different soil depths. Plant carrot seeds directly in the bed between tomato plants, spacing them 3 inches apart in rows. Thin seedlings to 4 inches apart once they sprout. Carrots take 60 to 80 days to mature, so you can harvest them before or after your tomato season depending on your planting date.
Parsley attracts parasitic wasps, which lay eggs inside hornworms and other tomato pests. The wasp larvae eat the pest from the inside, controlling the population without chemicals. Plant parsley 12 inches from tomato stems. It tolerates partial shade, so it can grow on the east side of tall tomato plants where it gets morning sun but afternoon protection.
Borage produces blue flowers that attract bees and other pollinators. More pollinators mean better fruit set and fewer misshapen tomatoes. Borage grows tall and sprawling, so plant it on the north side of your bed where it will not shade the tomatoes. It self-seeds readily, so one plant often returns the following year.
Plants to Keep Away from Tomatoes
Brassicas—cabbage, broccoli, kale, and cauliflower—compete with tomatoes for nitrogen and potassium. Both plant families also attract some of the same pests, so growing them together increases pest pressure on both. Keep brassicas at least three feet away, or grow them in a separate bed entirely. Fennel releases a chemical that inhibits tomato growth, so avoid planting it anywhere in the tomato bed.
Potatoes are susceptible to early blight and late blight, fungal diseases that also infect tomatoes. If you grow potatoes near tomatoes and one plant gets sick, the disease spreads easily to the other. Plant potatoes in a different area of the garden, at least 10 feet away if possible. Corn competes heavily for nitrogen and can shade tomatoes if planted on the south side, so grow corn in its own section.
Spacing and Air Flow for Healthy Companion Plantings
The distance between plants matters as much as which plants you choose. Leaves should not touch when both plants are fully grown, because touching leaves trap moisture and create conditions where fungal diseases spread. Space basil 12 to 18 inches from tomato stems. Space marigolds and nasturtiums 12 inches away. Carrots can be closer—3 to 4 inches—because their foliage stays low and does not shade the tomato canopy.
Air flow prevents disease. If your tomato bed is crowded, remove lower tomato leaves once the plant is 2 feet tall to open up the center. Prune companion plants that grow tall or wide so they do not block air movement. In humid climates, wider spacing is worth the trade-off of growing fewer plants per bed.
Timing Your Companion Plantings
Plant basil, marigolds, and nasturtiums at the same time as tomatoes or up to two weeks later. They all need warm soil (above 60°F) to germinate and grow, so wait until after your last frost date. Carrots and parsley can go in the ground two weeks before tomatoes because they tolerate cooler soil. Borage can be direct-seeded once soil is workable in spring.
If you start tomatoes from transplants and basil from seed, the basil will catch up quickly once it germinates. If you want basil to be the same size as your tomato transplants, buy basil transplants instead. This gives you pest protection from day one rather than waiting three weeks for basil seeds to sprout.
Frequently Asked Questions
Can I plant tomatoes and basil in the same pot?
Yes, if the pot is at least 18 inches deep and 24 inches wide. Plant the tomato in the center and basil around the edge, 12 inches away from the stem. Water consistently because containers dry out faster than garden beds. In hot climates, the pot may dry out daily in mid-summer.
What if I plant something that competes with tomatoes by accident?
Remove it as soon as you realize the mistake. If it is already established, dig it out carefully to avoid damaging tomato roots. The sooner you remove a competing plant, the less stress your tomatoes experience. Replant with a companion that helps instead.
Do companion plants actually increase tomato yield?
They do not increase yield directly, but they reduce pest damage and disease, which protects the yield you would otherwise lose. A tomato plant with fewer pests and better air flow produces more fruit than one stressed by insects or fungal infection. The effect is measurable but not dramatic—expect 10 to 20 percent more usable fruit over the season.
Can I use companion planting instead of pesticides?
Companion planting reduces pest pressure significantly but does not eliminate it entirely. In most home gardens, it prevents the worst infestations and keeps damage below the level where you need to spray. In years with very high pest pressure or in humid regions where disease is severe, companion planting alone may not be enough.
Should I plant the same companions every year?
Yes, if they worked well the previous year. Rotating which companions you plant helps prevent soil depletion and reduces the buildup of pests specific to certain plants. If you grew basil with tomatoes last year and had no whitefly problems, grow it again. If you had other issues, try a different companion that addresses that specific problem.