A productive vegetable bed is partly about which plants sit next to each other. Some pairings deter pests, attract pollinators, or feed their neighbours; others compete and stunt each other. This reference brings together the classic organic companion-planting wisdom into a quick lookup for whatever you are about to sow.
How it works
Pick a crop and the tool shows three things drawn from built-in horticultural data: good companions that benefit it, antagonists to keep apart, and a suggested spacing, along with a short note explaining the mechanism — pest masking, nitrogen fixing, shade, or allelopathy. All data is processed locally in your browser.
How companion planting actually works — the mechanisms
Understanding the why behind each pairing helps you apply them intelligently rather than following rules by rote.
Pest masking. Strong-scented plants like basil, onion, and marigold emit volatile compounds that mask the scent of neighbouring crops from insects hunting by smell. Aphids and carrot fly locate hosts through scent; planting a scented mask crop nearby disrupts this. The effect works best at close spacing (within 30 cm) and diminishes with distance.
Nitrogen fixation. Legumes (beans, peas, clover) host rhizobium bacteria in root nodules that convert atmospheric nitrogen into ammonium, making it available to neighbouring plants. After harvest, leaving the roots in the ground releases this nitrogen to the next crop in the rotation.
Allelopathy. Some plants release compounds through their roots or decaying leaves that suppress the growth of neighbours. Fennel is the most notorious example in the vegetable garden — it suppresses most vegetables and should generally be grown in a pot or isolated bed. Black walnut (juglone) is another classic case. Knowing this prevents frustrating mystery failures.
Physical support and microclimate. Tall plants like corn or sunflowers can shade heat-sensitive crops (lettuce, spinach) in summer, extending their season. Climbing beans use corn stalks as support — the basis of the three sisters — saving space and stakes.
Classic pairings explained
| Crop | Best companions | Key benefit |
|---|---|---|
| Tomato | Basil, marigold, carrot, onion | Basil deters aphids; marigold suppresses nematodes |
| Carrot | Onion, leek, rosemary | Allium scent masks carrot fly |
| Bean | Squash, corn, carrot | Nitrogen to neighbours; corn as trellis |
| Brassica | Dill, nasturtium | Dill attracts parasitic wasps; nasturtium is a trap crop for aphids |
| Cucumber | Radish, nasturtium, dill | Radish repels cucumber beetles |
What to keep apart
- Fennel should be isolated from almost everything — it inhibits tomatoes, peppers, beans, and most brassicas.
- Onion and garlic suppress beans and peas — their sulfur compounds inhibit legume root development.
- Potatoes should be kept well away from tomatoes because they share late blight (Phytophthora infestans).
- Brassicas (cabbage, broccoli, cauliflower) compete with tomatoes and strawberries and should not follow each other in rotation without a break.
Practical notes
Companion effects vary with climate, soil, and variety, so treat pairings as sound starting guidance rather than guaranteed outcomes. Rotate crops each season to avoid building up soil-borne pests, and observe your own garden — local results are the final word.