Flowers to Plant with Tomatoes to Keep Bugs Away
Discover the best companion flowers that naturally repel pests, attract beneficial insects, and help your tomatoes thrive without harsh chemicals.
Companion Planting Philosophy: Growing certain flowers alongside your tomatoes is one of the oldest and most effective organic pest control methods. These flowers release natural compounds that confuse, repel, or trap common tomato pests — while also attracting pollinators and beneficial predatory insects that keep your garden ecosystem balanced.
Why Companion Planting Works for Tomatoes
Tomatoes are notoriously vulnerable to a long list of pests: aphids, whiteflies, tomato hornworms, nematodes, and flea beetles, to name a few. While chemical sprays can knock these pests back temporarily, they often harm beneficial insects and leave residue on your harvest. Companion planting offers a smarter, sustainable approach.
Certain flowers work on multiple levels. Some emit strong scents that mask the tomato plant's chemical signature, making it harder for pests to locate. Others produce nectar that feeds predatory wasps and hoverflies — insects that happily devour the very pests threatening your crop. Still others act as trap crops, luring pests away from your tomatoes and onto themselves.
The best companion flowers are easy to grow, bloom reliably through the season, and fit naturally into both vegetable beds and container gardens. Below, we cover the top performers and how to use them effectively.
1. Marigolds — The Classic Tomato Companion
Marigolds (Tagetes species) are the undisputed champions of tomato companion planting. Their roots release a compound called alpha-terthienyl that is toxic to root-knot nematodes, one of the most destructive soil pests for tomatoes. The strong, pungent foliage also repels whiteflies and aphids.
French marigolds (Tagetes patula) are the most effective variety for pest control and stay compact enough to tuck between tomato plants. African marigolds (Tagetes erecta) grow taller and work well as a border. Plant them densely — about one marigold every two to three tomato plants — and let them bloom continuously throughout the season.
Marigolds also attract hoverflies, whose larvae are voracious aphid predators. For gardeners dealing with persistent aphid pressure, pairing marigolds with a drip irrigation system keeps foliage dry and further discourages pest outbreaks.
2. Nasturtiums — The Trap Crop Extraordinaire
Nasturtiums (Tropaeolum majus) serve double duty: they repel whiteflies and squash bugs while acting as a sacrificial trap crop for aphids. Aphids are strongly attracted to nasturtiums and will colonize them instead of your tomatoes, making it easy to remove and dispose of the infested plants.
These trailing, easy-to-grow annuals also attract pollinators and are edible — the peppery leaves and flowers add a lovely kick to salads. Plant nasturtiums at the edges of your tomato bed or allow them to spill from containers. They thrive in slightly poor soil, so avoid over-fertilizing, which encourages leaf growth at the expense of blooms.
3. Borage — The Tomato Hornworm Deterrent
Borage (Borago officinalis) is a powerful ally for tomato growers. Its star-shaped blue flowers attract bees and predatory wasps in droves, improving pollination and natural pest control. More importantly, borage is known to repel tomato hornworms — the large green caterpillars that can defoliate a plant overnight.
Borage also improves the flavor of tomatoes when grown nearby, according to many experienced gardeners, and its deep taproot helps bring up nutrients from the subsoil. Plant borage near the back of your tomato bed, as it can grow three feet tall and tends to self-seed prolifically.
4. Basil Blossoms — Repel Thrips and Mosquitoes
Basil is famous as a tomato companion, and for good reason. Its aromatic oils repel thrips, whiteflies, and mosquitoes, while its flowers are highly attractive to pollinators. When basil bolts and produces its small white flower spikes, leave a few to bloom — the nectar is a magnet for beneficial insects.
Plant basil between tomato plants, about 12 to 18 inches apart. If you're growing culinary herbs for harvest, pinch most flower spikes but allow one or two plants to flower fully for maximum pest-repelling benefit.
5. Petunias — A Natural Aphid and Beetle Barrier
Petunias are a lesser-known but highly effective companion for tomatoes. Their sticky hairs trap aphids and small flying insects, while their strong scent repels tomato worms and flea beetles. They also bloom prolifically from spring to frost, providing continuous pest protection.
Plant petunias as a low border around your tomato bed or in hanging baskets near your tomatoes. They prefer full sun and well-drained soil, and they pair beautifully with marigolds for a colorful, pest-resistant garden edge.
6. Sunflowers — Trap Crop for Stink Bugs
Sunflowers act as a trap crop for stink bugs, which are drawn to them over tomatoes. Plant sunflowers along the perimeter of your garden to lure stink bugs and other pests away from your main crop. Their height also provides a windbreak and shade for heat-sensitive plants.
Choose smaller varieties if space is limited, and keep in mind that sunflowers can allelopathically suppress some plants — so give them room. Their seeds are a bonus, attracting birds that further help with pest control. For more on butterfly-friendly plants, you can also explore complementary species.
How to Choose and Plant Companion Flowers
The best companion planting plan combines several flower types for layered protection. Marigolds tackle nematodes and whiteflies, nasturtiums trap aphids, borage deters hornworms, and basil repels thrips and mosquitoes. Together, they create a resilient, low-maintenance pest management system.
When planning your layout, place taller flowers like borage and sunflowers toward the back or edges, with lower-growing marigolds, petunias, and nasturtiums in front or between tomato rows. Ensure all plants receive adequate sun and water — a drip irrigation system makes this easier and keeps foliage dry, reducing disease pressure.
Start flowers from seed indoors or purchase transplants at your local nursery. Most companion flowers are fast-growing and begin working within weeks. Rotate your companion plantings each season to prevent soil-borne pest buildup, and incorporate organic matter into your beds with a compost bin to keep soil healthy and productive.
Common Mistakes to Avoid
One of the most common mistakes is overcrowding. Companion flowers need air circulation just like tomatoes, and overcrowded beds invite fungal diseases. Give each plant enough space and prune excess foliage as needed.
Another mistake is relying on flowers alone. Companion planting works best as part of an integrated pest management strategy that includes proper spacing, crop rotation, and healthy soil. For lawns and surrounding areas, consider environmentally friendly lawn care to reduce pest pressure from adjacent spaces.
Finally, avoid using pesticides on or near your companion flowers. These chemicals can kill the beneficial insects you're trying to attract and defeat the purpose of companion planting entirely. Instead, handpick pests when you see them and encourage natural predators.
Final Thoughts
Planting the right flowers alongside your tomatoes is one of the simplest, most rewarding ways to protect your crop while enhancing the beauty and biodiversity of your garden. Marigolds, nasturtiums, borage, basil, petunias, and sunflowers each bring unique benefits — and together they create a vibrant, self-regulating garden ecosystem.
Whether you're growing a small container garden or a full vegetable plot, companion flowers are an investment that pays off in healthier plants and a more abundant harvest. Start with marigolds and basil if you're new to companion planting — they're forgiving, widely available, and deliver reliable pest-repelling results season after season.