Guides

What to Plant With Tomatoes: Best Tomato Companion Plants (and What to Avoid)

Good tomato companion plants, what not to plant with tomatoes, and a simple bed layout, summarized from extension guidance.

Updated Oct 2026 · 5 min read · Extension-sourced

Short answer

Good tomato companions include basil, carrot, cucumber, garlic, lettuce, marigold, nasturtium, onion. Keep tomatoes away from cabbage family, corn, fennel, potato, and well away from black walnut trees.

Tomatoes are the crop most home gardeners plan everything else around, so "what do I put next to them?" is usually the first companion-planting question. Here is what extension services list as good and poor tomato neighbors, why, and how to fit them into a real bed.

Good companion plants for tomatoes

CompanionWhy it works
BasilGrow well side by side; basil may help mask tomatoes from some pests.
CarrotDifferent root depths; tomato foliage shades heat-sensitive carrots.
CucumberListed tomato companion.
GarlicOnion-family crops are listed as tomato companions.
LettuceLettuce tucked behind tall tomatoes gets summer shade and bolts later.
MarigoldListed companion; marigolds' nematode benefit is strongest when grown ahead of the crop.
NasturtiumListed tomato companion.
OnionOnion-family crops are listed as tomato companions.

Herbs: basil

Basil is the classic tomato partner. Both like heat, full sun and steady watering, and they are ready at the same time for the kitchen. Tuck a basil plant between tomato cages or along the sunny front edge of the bed.

Vegetables: carrots, lettuce, onions and garlic

These use the space tomatoes leave empty. Carrots root deeper than lettuce and sit happily under tomato foliage. Lettuce planted on the shady side of tall tomatoes stays cooler in summer and is slower to bolt. Onions and garlic take up little room along the bed edge. Cucumbers are listed too; grow them up a trellis so the vines do not tangle into the tomato cages.

Flowers: marigolds and nasturtiums

Both are listed as tomato companions and bring color that draws pollinators and beneficial insects into the bed. Marigolds are often recommended for root-knot nematodes, but the benefit shows up mainly when a dense marigold planting grows before the crop, not from a few plants scattered among tomatoes.

What not to plant with tomatoes

AvoidWhy
Cabbage familyListed as incompatible.
CornListed as incompatible.
FennelListed as incompatible.
PotatoSame family; attacked by the same pests and diseases.
  • Potatoes are in the same family (the nightshades) and share diseases such as early and late blight, so planting them side by side makes it easier for problems to spread.
  • Corn: the corn earworm and the tomato fruitworm are the same insect, so the two crops can feed one pest population.
  • Fennel is listed as a poor neighbor for tomatoes (and most vegetables). Many gardeners give it a spot of its own.
  • Cabbage-family crops (cabbage, broccoli, kale, cauliflower) are listed as incompatible with tomatoes; give them their own cool-season bed.

Black walnut trees

This one is not a companion question but it matters more than any of them. Black walnut roots, leaves and hulls contain juglone, and tomatoes are among the most sensitive plants to it. Wisconsin Extension notes the effect can reach 50 to 80 feet from a mature tree. Peppers, potatoes and eggplant are sensitive too. Site tomato beds well away from black walnuts.

Can tomatoes and peppers grow together?

Yes, many gardeners grow them side by side, and the extension sources we use do not list them as a bad pair. Both are nightshades with similar sun, heat and water needs, which makes them easy bed-mates. The catch is rotation: because they share some diseases, move tomatoes and peppers to a new spot together each year rather than swapping one for the other. Basil and onions are listed companions for both, which is why a salsa bed (tomato, pepper, onion, basil) works so well.

Do companion plants keep hornworms away?

No plant reliably repels tomato hornworms. University of Minnesota Extension says picking them off by hand is the most effective control, and recommends checking plants at least twice a week in summer. Look for dark droppings on lower leaves and follow them upward.

Flowers in and around the bed still help indirectly, because they support predators such as lady beetles, lacewings and paper wasps that feed on eggs and young caterpillars.

A simple tomato bed layout

  1. Tomatoes along the north side.

    Stake or cage them and allow about one tomato per square foot in an intensive raised bed (more room for big sprawling varieties), so they do not shade the rest of the bed.

  2. Basil between the cages.

    One plant between each pair of tomatoes, or a row of four per square foot along the front.

  3. Onions, garlic or carrots in the middle rows.

    Low crops that fit around tomato roots.

  4. Marigolds and nasturtiums on the corners.

    Let nasturtiums trail over the edge rather than climb into the tomatoes.

Want the full picture? See our raised bed layouts for a ready-made 4×8 salsa bed, and the keep-apart chart for every pair to avoid.

Tomatoes in containers

In a pot, give the tomato its own large container (at least about 5 gallons, bigger for indeterminate varieties) and put basil, marigolds or nasturtiums in a neighboring pot or around the rim of a very large container, so the tomato is not competing for water.

Planting calendar

Tomatoes go out after your last frost. Get your exact indoor-start and transplant dates.

Open it

Sources

Pairings are summarized in our own words from extension-service guidance. Research support for many companion effects is limited, so treat them as good habits, not guarantees.

Related guides