It is frustrating when you watered your tomato plant perfectly and given it plenty of sun, but still ended up with sad, tiny fruits. You feel like you did everything right but something is still missing. I have been there too. The secret might be growing right next to your tomatoes!
Companion planting is like matchmaking for your garden. Some plants just bring out the best in each other. And when it comes to tomatoes, the right friends can mean bigger harvests, fewer bugs, and even better tasting fruit.
The idea is simple: some plants grow better together, whether it's because they help each other ward off pests, improve the soil, or even just provide a bit of shade.
I have tested dozens of combinations in my own small urban garden. Some worked beautifully. Others failed terribly.
In this guide, I will share the 12 best companion plants for tomatoes that actually work. No fluff. Just real, garden-tested advice.

The short answer: The best companion plants for tomatoes are basil (for flavor and pest control), marigolds (for nematodes), and nasturtiums (as a trap crop for aphids). Keep tomatoes away from potatoes, corn, and fennel. Keep reading for the full list of 12 companions and a printable chart.
Why Companion Planting is Essential for Healthy Tomatoes

Let me tell you about the first time companion planting saved my tomatoes. A few years ago, aphids attacked my plants like tiny green vampires. I tried soap spray. I tried picking them off by hand. Nothing worked for long.
Then an older gardener told me to plant marigolds and basil right next to my tomatoes. I was skeptical. Flowers? Herbs? How could that help?
What is a Garden Guild?
Think of it like a neighborhood. Good neighbors help each other. Bad neighbors cause problems. Your tomato plants need good neighbors.
The fancy word for this is a "guild." A guild is a group of plants that work together. Each plant plays a role. Some fix nitrogen in the soil. Some provide ground cover. Some repel pests. When you build a good guild, your whole garden thrives.
How Companion Planting Saved My Tomatoes
Within two weeks of planting marigolds and basil, the aphids were gone. My tomatoes grew taller than ever. And the basil I planted? It made the most amazing pesto. That is when I became a believer.
Companion planting is not magic. It is science. Plants communicate through their roots. They release chemicals into the soil. Some chemicals attract good bugs. Others chase away bad bugs. Some plants even change the flavor of their neighbors.
Now let me show you what companion planting looks like in a real garden.
Watch This: Companion Planting in Action
Take a moment to watch this short video from Next Level Gardening. It shows exactly how to arrange basil, marigolds, and other companions around your tomato plants. I lke the visuals, which is easy to understand.
Hope you enjoyed the video? Now let's dive into my complete list of the 12 best companion plants for tomatoes. I will show you the best neighbors for your tomatoes and some must-avoid combos!
The 6 Best Companion Plants for Tomatoes (Flowers & Herbs)
I have tried more than twenty different companions over the years. Some did almost nothing. These six are the true champions. I plant them every single season without fail.
Growing Marigolds and Tomatoes Together for Nematodes
Marigolds are the bodyguards of the tomato world. They do something really clever underground. Their roots release a natural chemical that kills tiny worms called nematodes. Nematodes attack tomato roots. You cannot see them, but they cause stunted growth and low yields.
I plant French marigolds around the edges of my tomato beds. One marigold for every two tomato plants is a good ratio. The marigolds also add bright orange and yellow color. Plus, they bloom for months with almost no care.
For more details on keeping marigolds happy all season, check out my full guide on caring for marigolds.
Nasturtium Companion Planting for Tomato Aphids

Nasturtiums are like decoys. Aphids love them more than tomatoes. So when aphids show up, they go to the nasturtiums first. This gives your tomatoes a fighting chance.
I plant nasturtiums about a foot away from my tomato stems. The bright orange and red flowers look beautiful against the green tomato leaves. And here is a bonus. Both the leaves and flowers of nasturtiums are edible. They taste peppery, like arugula. I toss them into summer salads.
For more on growing this colorful flower, see my guide on nasturtium care.
One warning: Nasturtiums spread out. Give them their own space. Do not let them climb up your tomato cage. They will shade the lower leaves.
Basil: The Classic Tomato Companion for Flavor and Pest Control
If you only plant one companion with your tomatoes, make it basil. This is not just an old wives' tale. Basil really does improve tomato flavor. Scientists think the two plants exchange chemical signals through their roots. The result is sweeter, more aromatic tomatoes.
Basil also repels tomato hornworms. Hornworms are huge green caterpillars that can strip a tomato plant in one day. The strong smell of basil confuses them. They look for food elsewhere. See my guide on how to get rid of tomato hornworm naturally.
I plant two basil seedlings right next to each tomato plant. Then I harvest the basil leaves all summer. The more you harvest, the bushier the basil grows. By August, I have enough basil for pesto, caprese salads, and drying for winter.
You can even grow basil from cuttings. It is surprisingly easy. Learn how in my guide on growing basil from cuttings and propagating basil .
Benefits of Planting Chives Near Tomato Plants

Chives are the quiet overachievers of the garden. They look like tall grass. They grow in small clumps. And they never stop producing. Their onion smell repels aphids, spider mites, and even Japanese beetles.
I tuck chives around the base of my tomato containers. They fit perfectly in small spaces. The purple flowers in spring attract bees, which pollinate my tomato blossoms. Then I snip the green leaves all summer to add to baked potatoes, soups, and scrambled eggs.
Chives are perennials. That means they come back every year. Plant them once, and they will protect your tomatoes for seasons to come. For more tips, read how to grow chives indoors .
Using Borage as a Tomato Companion Plant
Borage is the plant most gardeners forget. That is a mistake. Borage does two amazing things for tomatoes.
First, it deters tomato hornworms. The fuzzy leaves confuse the moths that lay hornworm eggs. Fewer eggs mean fewer caterpillars eating your tomatoes.
Second, borage improves tomato flavor. Old gardening books call borage the "herb of courage." They believed it made plants brave. Today we know borage adds trace minerals to the soil. Your tomatoes absorb those minerals. The result is richer, more complex flavor.
Borage grows tall, up to two feet. Plant it on the north side of your tomatoes so it does not block the sun. The star-shaped blue flowers are edible too. They look beautiful floating in summer lemonade.
Best Flowers to Plant with Tomatoes for Pollinators and Pest Control
Tomatoes need bees. Without pollination, flowers drop off and no fruit forms. So attracting bees is critical. Several flowers do this while also repelling pests.
This is my three favorite pollination flowers:
1. Calendula (pot marigold)
Not the same as regular marigolds. Calendula flowers are yellow and orange. They attract hoverflies. Hoverfly larvae eat aphids by the hundreds.
2. Sweet alyssum
This low, white flower grows like a carpet. It attracts tiny wasps that parasitize hornworms. The wasps lay eggs inside the hornworm. Gross but effective.
3. Lavender
Bees adore lavender. The purple spikes smell amazing. Lavender also repels mosquitoes and whiteflies. Plant it on the edge of your tomato bed. See my guide on propagating lavender for more.
All three flowers are easy to grow from seed. They bloom for months with little water or fertilizer.
Companion Planting for Tomatoes in Small Spaces
Not everyone has a big backyard. I certainly do not. Most of my tomatoes grow on a small patio or balcony. Small space gardening just requires a few adjustments.
Best Companion Plants for Tomatoes in Containers

Container tomatoes need companions that stay small. You cannot plant sprawling marigolds or giant borage in a five gallon pot. These companion plants works:
- Basil again. One basil seedling fits perfectly around the edge of a tomato pot. It does not compete for root space. The two plants grow happily together.
- Nasturtiums in small pots. Place a separate small pot of nasturtiums next to your tomato container. Do not plant them in the same pot. They spread too wide.
- Thyme. This low creeping herb fits anywhere. It does not need much soil. Its small leaves release a strong scent that repels whiteflies.
- Oregano. Another small herb. Oregano thrives in the same hot, sunny conditions as tomatoes. It attracts bees when it flowers.
Make sure your containers have drainage holes. Companion plants in pots still need good drainage. Water when the top inch of soil feels dry. For more container tomato tips, read my guide on patio tomato plants and cherry tomatoes in containers.
Companion Plants for Tomatoes in Raised Beds
Raised beds give you more room. You can plant taller companions and spread things out. Here is my raised bed layout. I plant tomatoes down the center of the bed. On the north side, I put borage and tall marigolds. On the south side, I put low herbs like thyme and chives. Around the edges, I tuck nasturtiums and sweet alyssum.
This layout gives every plant sun. Nothing gets shaded out. The low herbs act as living mulch. They keep the soil cool and moist. The flowers attract bees from across the yard.
If you use raised beds, keep the soil fertile. Companion plants still need nutrients. Add compost each spring. Water deeply twice a week. If you are new to raised bed gardening, start with my beginner guide on how to start urban gardening .
What Makes These Plants "Best Friends"?
You may have noticed that all these companions do one or more of these jobs.
Job | Which Plant Do This |
|---|---|
Repel pests | Marigolds, nasturtiums, basil, chives, borage |
Attract Pollinators | Borage, lavender, sweet alyssum, calendula |
Improve flavor | Basil, borage |
Act as trap crop | Nasturtiums |
Provide ground cover | Thyme, oregano, sweet alyssum |
You do not need to plant all of them. Pick two or three that fit your space. Even one good companion makes a difference.
Coming Up Next
Now you know the best friends for your tomatoes. These plants will protect, feed, and even improve the taste of your harvest.
But there is another side to companion planting. Some plants are terrible neighbors. They compete with tomatoes or spread diseases. In the next section, we will talk about what to keep away from your tomatoes. That includes potatoes, corn, fennel, and a few surprises.
I will also answer a common question: can you plant peppers next to tomatoes? (Spoiler: yes, but with one important rule.) Keep reading to avoid the mistakes that cost me entire harvests.
What NOT to Plant Next to Tomatoes (Avoid These!)
Not every plant plays nice with tomatoes. I learned this the hard way. One year I planted potatoes right next to my tomatoes. Both crops failed. The blight spread from one to the other. It was heartbreaking.
Let me save you from the same mistake. Here are the plants you should keep far away from your tomatoes.
What Not to Plant Next to Tomatoes
1. Potatoes
This is the biggest don't. Tomatoes and potatoes are both in the nightshade family. They share diseases, especially blight. Blight is a fungus that turns leaves black and mushy. Once it starts, it is very hard to stop.
If you grow potatoes, put them on the opposite side of your garden. Or better yet, grow them in a container far from your tomatoes.
2. Corn
Corn attracts tomato fruit worms. These worms eat holes right through your tomatoes. The same worms also love corn. Planting them together is like inviting pests to a buffet.
3. Fennel
Fennel is an herb that looks beautiful. But it is a bully. Fennel releases chemicals from its roots that stop tomatoes from growing. Do not plant fennel anywhere near your tomato bed.
4. Brassicas
This family includes cabbage, broccoli, cauliflower, and kale. These plants compete with tomatoes for the same nutrients. They also attract different pests that can still bother your tomatoes.
For more on what not to plant with other crops, check out my guide on cauliflower companion plants.
Can You Plant Peppers, Eggplants, or Potatoes with Tomatoes?
This question comes up all the time. Let me give you a clear answer for each.
Peppers

Yes, you can plant peppers next to tomatoes. They are both nightshades. They like the same sun, water, and soil. I grow peppers right next to my tomatoes every year. The peppers ripen beautifully.
But there is one rule. Do not plant them in the exact same spot year after year. Rotate your crops. Move your tomatoes and peppers to a new bed each season. This prevents soil diseases from building up.
For the best pepper varieties for small spaces, see my guide on best peppers to grow in containers.
Eggplants
Yes, but with caution. Eggplants are also nightshades. They can be planted near tomatoes. However, they are more sensitive to pests. Spider mites love eggplants. If your eggplants get infested, the mites may spread to your tomatoes.
Keep a close eye on your eggplants. At the first sign of trouble, treat them with neem oil or insecticidal soap.
Potatoes
No, do not plant potatoes near tomatoes. I already explained why. Blight is the main concern. Once blight appears on potatoes, it jumps to tomatoes within days. Keep them as far apart as your space allows.
If you really want to grow potatoes, try growing them in a separate container or a different part of your yard. Learn more in my guide on growing potatoes in straw.
How to Space & Plant Tomato Companions
Spacing is just as important as choosing the right companions. Too close together, and your plants fight for light and water. Too far apart, and the companion cannot do its job.
How Far Apart to Space Tomato Companion Plants
Follow my simple spacing rules:
Companion Plant | Distance from Tomato Stem |
|---|---|
Basil | 6 to 12 inches |
Marigolds | 8 to 10 inches |
Nasturtiums | 12 inches |
Chives | 4 to 6 inches |
Borage | 12 to 18 inches (on north side) |
Thyme / Oregano | 6 to 8 inches (as ground cover) |
Tomatoes themselves need space. Indeterminate tomatoes (the ones that keep growing tall) need 24 inches between plants. Determinate tomatoes (bush types) need 18 inches.
Give your companions room to breathe. Crowded plants get mildew and pests.
Companion Planting Garlic with Tomatoes for Blight Prevention
Garlic is a special case. It is not a "best friend" exactly. But it is not a "frenemy" either. Garlic belongs in its own category.
Garlic has strong antifungal properties. When planted near tomatoes, it can help prevent late blight. The sulfur compounds in garlic travel through the soil. They create an environment where blight spores struggle to survive.
How to plant garlic with tomatoes?

Plant garlic cloves in the fall before your tomatoes go in. The garlic will grow over winter. By spring, it will be established. Then plant your tomato seedlings 6 to 8 inches away from the garlic stems.
Harvest the garlic in mid-summer. By then, your tomatoes will be large enough to protect themselves.
Do not plant garlic right up against the tomato stem. Give both plants their own space. And never plant garlic in the same spot two years in a row. Rotate your garlic and tomatoes together.
For more on growing herbs indoors during the off-season, check out how to grow thyme indoors and english thyme plants.
A Quick Note About Pests You Might See
Even with perfect companion planting, pests can still show up. Do not panic. That is normal.
If you see tomato hornworms, pick them off by hand (wear gloves). If you see aphids, spray them off with a strong hose. If you see white fuzzy bugs, you can identify them with my guide on white fuzzy bug on plants .
For more serious infestations, learn about tomato hornworm control and squash bugs (which can also bother tomatoes).
You now know which plants to keep away from your tomatoes and how to space everything correctly.
In this final section, I will give you a printable quick reference chart that summarizes all 12 companion plants. I will also answer the most frequently asked questions about tomato companion planting.
That way, you can save the chart on your phone or pin it on your garden shed for easy reference.
Quick Reference Chart (Printable / Screenshot)
You made it to the end. That means you really care about growing better tomatoes. Let me reward you with a simple chart you can save to your phone or print for your garden shed.
The Ultimate Tomato Companion Planting Chart
Plant | Best Buddy For | Benefits | Spacing | Keep Away From |
|---|---|---|---|---|
Basil | All tomatoes | Improves flavor, repels hornworms | 6-12 inches | Rue |
Marigolds | All tomatoes | Kills nematodes, repels aphids | 8-10 inches | Nothing |
Nasturtiums | All tomatoes | Trap crop for aphids | 12 inches | Nothing |
Chives | All tomatoes | Repels aphids and spider mites | 4-6 inches | Peas, beans |
Borage | Beefsteak tomatoes | Deters hornworms, adds minerals | 12-18 inches | Nothing |
Garlic | All tomatoes | Prevents blight | 6-8 inches | Peas, beans |
Thyme | All tomatoes | Ground cover, repels whiteflies | 6-8 inches | Nothing |
Peppers | Determinate tomatoes | Shares same care needs | 18 inches | Potatoes |
Carrots | All tomatoes | Loosens soil | 4-6 inches | Dill |
Lettuce | All tomatoes | Living mulch, shade | 6-8 inches | Nothing |
Spinach | All tomatoes | Weed suppression | 6-8 inches | Nothing |
Calendula | All tomatoes | Attracts hoverflies | 8-10 inches | Nothing |
How to use this chart
When you plant your tomatoes, look at the chart. Pick two or three companions from the list. Plant them at the spacing shown. That is it. You do not need to plant every single one.
For more ideas on year-round container planting, see my guide on best plants for pots all year round.
Frequently Asked Questions About Tomato Companions
Here are the questions I get asked most often by readers. I have kept the answers short so you can find what you need fast.
What is the best companion plant for tomatoes?
Basil is the best overall companion. It repels tomato hornworms, may improve flavor, and you can eat it all summer. Plant one basil seedling next to each tomato.
What should not be planted next to tomatoes?
Avoid planting potatoes (blight risk), corn (attracts fruit worms), fennel (stunts growth), and brassicas like cabbage and broccoli (compete for nutrients).
Can I plant peppers next to tomatoes?
Yes, peppers and tomatoes grow well together. They need the same sun, water, and soil. Just rotate them to a new spot each year to prevent disease buildup. For more pepper tips, see best peppers to grow in containers.
What should I plant next to tomatoes to keep bugs away?
Plant marigolds, nasturtiums, and basil. Marigolds kill root nematodes. Nasturtiums lure aphids away. Basil repels hornworms. Together, they handle 90% of common tomato pests.
If you already have bugs, identify them first with my guide on white fuzzy bug on plants or scales bugs on plants.
What to plant with tomatoes in a container?
In a container, plant basil, chives, or thyme. These herbs stay small and do not compete for root space. Do not plant borage or marigolds in the same pot. They grow too large.
For container-specific tomato advice, read patio tomato plants and cherry tomatoes in containers.
How far apart should I plant tomato companions?
Use the spacing chart above. As a general rule, small herbs go 4 to 8 inches away. Medium flowers go 8 to 12 inches away. Large companions like borage go 12 to 18 inches away on the north side.
Can I plant cucumbers next to tomatoes?
Yes, cucumbers and tomatoes can be planted near each other. They like the same conditions. However, cucumbers take up a lot of space. Give them extra room or grow them on a trellis. For more cucumber tips, see cucumber companion plants and english cucumber plant.
What herbs grow best with tomatoes?
Basil, chives, oregano, parsley, and thyme are the best herb companions. Avoid planting fennel or dill near tomatoes. Dill attracts tomato hornworms when it matures.
My Final Tips - Let's Talk Tomatoes!
You now have everything you need to build a thriving tomato garden with the best companions. Let me leave you with this thought. Start small. Pick just one or two companions to try this season. Basil and marigolds are the easiest. See how they work for you. Then add more next year.
If you are just starting your urban gardening journey, read my full guide on how to start urban gardening . It covers soil, containers, watering, and everything else a beginner needs. And if you ever struggle with pests, remember that my guides on tomato hornworm, cabbage worms , and squash bugs are there to help.
I have shared my 12 best companion plants. Now I want to hear from you. Drop a comment below answering one of these questions:
1. Which companion plant are you excited to try this year?
2. What is your biggest tomato growing struggle right now?
3. Have you ever planted something near tomatoes that went terribly wrong?
I personally reply to every comment within 48 hours. Your question might even become my next blog post.
Happy gardening, and I will see you in the comments.
Read Next:
Last Updated on April 28, 2026 by Austine

