What to Plant With Tomatoes to Keep Bugs Away

Companion planting uses the natural properties of certain plants to protect vulnerable crops, offering a chemical-free approach to pest management. This strategy relies on creating a diverse ecosystem where plants assist each other through direct repulsion, scent confusion, or the attraction of beneficial insects. Tomatoes, which are a popular crop, are highly susceptible to pests like the devastating tomato hornworm, whiteflies, and microscopic root-knot nematodes. By strategically incorporating specific herbs and flowers into the tomato patch, gardeners can establish a living defense system to safeguard their harvest from common threats.

Aromatic Herbs and Flowers for Direct Repellence

Certain flowering and herbaceous plants deter harmful insects by releasing strong compounds into the air and soil. These chemicals overload the pest’s sensory system, making the area around the tomato plant unattractive for landing or egg-laying. This repulsion starts the moment the companion plant begins to grow.

French marigolds, particularly varieties like ‘Nemagold,’ offer a dual-action defense. Their roots secrete alpha-terthienyl, which suppresses root-knot nematode populations in the soil by 70–80%. For maximum soil benefit, marigolds are often grown as a dense cover crop for several months before tomatoes are planted. Additionally, the strong scent from their foliage releases limonene, a compound that repels whiteflies.

Basil is a classic tomato companion; its potent aroma deters key pests like the tomato hornworm and garden flies. The volatile oils in the foliage mask the tomato plant’s scent, making it harder for the adult hornworm moth to locate an egg-laying site. Basil’s presence can also repel aphids and whiteflies. Borage, characterized by its striking blue flowers, is another effective deterrent against the tomato hornworm, and its presence is widely observed to dissuade the large caterpillars from feeding on nearby tomato plants.

Alliums and Root Crops That Mask Host Scents

A different defensive strategy involves companion plants that confuse pests by disrupting their ability to detect the tomato’s natural scent. Many insects rely on specific chemical cues, known as host volatiles, to locate their preferred food source. Plants with powerful, pungent odors can effectively jam this sensory signal.

The Allium family, which includes garlic, chives, and onions, excels at this type of sensory confusion. These plants contain high levels of sulfurous compounds that are released into the air and soil, creating a pervasive odor field. This strong smell masks the tomato plant’s own scent, preventing pests like aphids and spider mites from identifying the tomato as a suitable host.

Intercropping garlic among tomato rows reduces aphid populations significantly compared to monoculture plantings. This mechanism overwhelms the insect’s olfactory system, causing them to fly past the tomato patch entirely. Planting these root crops also utilizes shallow soil space, as their root systems do not compete significantly with the deeper tomato roots.

Attracting Beneficial Insects to Control Pests

Some companion plants act as insectary plants, attracting beneficial insects that prey on or parasitize tomato pests. This establishes a natural, self-regulating biological control system within the garden. Beneficial predators require both a pest population to eat and a source of nectar and pollen to sustain their adult life stage.

Plants with small, umbrella-shaped flower clusters, known as umbellifers, are particularly effective attractants. Herbs like dill, fennel, and parsley, when allowed to flower, provide easy access to nectar and pollen for tiny beneficial insects. These resources nourish predators such as ladybugs, lacewings, and hoverflies.

Ladybug and hoverfly larvae are voracious consumers of soft-bodied pests like aphids. Adult parasitic wasps are drawn to these flowers to fuel their search for larger prey, such as the tomato hornworm. The wasp lays its eggs on the caterpillar’s body, encouraging an ecological balance where beneficial insects continuously manage the pest population.

Implementing Your Companion Planting Strategy

Successfully using companion planting requires careful consideration of proximity, density, and timing. The location of the companion plant relative to the tomato is paramount for the protective effect to occur. For instance, creating a border of marigolds 12 to 24 inches away is often more effective than interspersing single plants throughout the row.

The scale of the companion planting must be sufficient to generate the necessary concentration of repellent odors or to sustain a beneficial insect population. A high density of aromatic herbs, such as basil, planted closely around the tomato’s base helps to maximize the scent confusion effect. Timing is equally important; for the best defense against whiteflies, the companion plants must be growing alongside the tomatoes from the start of the season.

For soil-borne pests like nematodes, the strategy involves planting a dense crop of French marigolds as a pre-season cover crop. This allows the roots to release their nematicidal compounds before the tomatoes are introduced. By integrating different plant functions into a thoughtful layout, gardeners can build a robust environment that dramatically reduces pest pressure.