By Azura · Updated June 2026 · Raised Garden Hub is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you.

Tomatoes are the star of most raised beds — and they grow better with the right neighbors. Companion planting deters pests, attracts pollinators, and makes the most of your space.

Best companions for tomatoes

  • Basil — may deter whiteflies; many gardeners swear it improves flavor.
  • Marigolds — deter nematodes and aphids; easy color.
  • Nasturtium — a “trap crop” that lures aphids away from your tomatoes.
  • Garlic & onions — their scent confuses many pests.
  • Carrots & lettuce — low growers that use the space under tall tomatoes.
  • Borage — attracts pollinators and predatory insects.

Plants to keep away from tomatoes

  • Brassicas (cabbage, broccoli, kale) — compete heavily for nutrients.
  • Potatoes — same family, so they share blight; keep them apart.
  • Fennel — releases compounds that stunt many neighbors.
  • Corn — attracts the same worm (corn earworm = tomato fruitworm).

A simple 4×4 layout

Put one tomato in the center with a cage (use a determinate/bush variety in a 4×4 — indeterminate types need their own 4×4 or a bigger bed), ring it with basil and marigolds, and tuck lettuce or carrots along the cooler edge. You get pest protection, pollinators, and a second crop from the same square footage.

Why it works

Companion planting is mostly about diversity: mixed plantings are harder for a single pest to wipe out, and flowering companions bring in the predators (ladybugs, hoverflies) that eat the pests for you.

New to all this? Start with our raised bed gardening for beginners guide, and make sure your bed is the right size before you plant.