Companion planting for vegetables — what to grow together, and what to avoid

Which vegetables make good neighbours, and which harm each other? Proven and scientifically backed vegetable pairings — with the reasoning behind every recommendation.

Edited by:Redakcja Atlas-Flora · Updated: July 12, 2026

Not all vegetables get along. Well-chosen neighbours can protect each other from pests, enrich the soil for one another, and make better use of space — poorly chosen ones compete for the same resources, share diseases, or even chemically suppress each other’s growth. Every recommendation in the Atlas-Flora database carries an evidence level: research-backed, practical observation, or gardening tradition — so you can see exactly what a given piece of advice is based on.

Why plant neighbours matter

Plants affect one another in several ways: they compete for water, light and nutrients; some (like beans) fix atmospheric nitrogen and enrich the soil for their neighbours; others release chemical compounds that suppress competing plants’ growth (allelopathy — see FAQ); and plants from the same botanical family share the same diseases and pests, so planting them close together raises the risk of an outbreak spreading across the bed.

Proven good pairings

  • Carrot and onion — a classic, well-proven duo. The onion’s scent makes it harder for carrot root fly to find the carrots, and the carrot returns the favour against onion pests.
  • Beans and cucumber — beans fix atmospheric nitrogen thanks to nodule bacteria on their roots, enriching the soil for nitrogen-hungry neighbours like cucumbers or courgettes.
  • Garlic and aphid-prone plants — the strong scent of garlic (and onion) helps deter aphids from nearby crops, including roses and strawberries.
  • Beetroot and onion — similarly modest water needs and no competition for the same pests make them easy-going neighbours.

What to avoid — bad pairings

  • Potato and tomato — both belong to the nightshade family and share susceptibility to late blight. Planting them close together makes it easy for the disease to jump from one crop to the other.
  • Onion and garlic next to beans — a documented allelopathic effect: compounds released by Allium plants suppress legume growth. Keep them away from beans and peas.
  • Vegetables near a walnut tree — if a walnut tree grows in your garden, avoid planting vegetables (tomatoes especially) beneath its canopy — the tree’s roots release juglone, which is highly toxic to many plants (see FAQ).

A practical rule: rotate crops year to year

Beyond same-season neighbours, rotating crops between years also matters. Avoid growing vegetables from the same botanical family (e.g. potato and tomato, or onion and garlic) in the same spot two years running — this limits the build-up of family-specific diseases and pests in the soil.

Check it for your own vegetables

Every vegetable card in the Atlas-Flora database has a “Companion plants” section listing proven neighbours and pairings to avoid, with the reasoning behind each — check it before planning your beds in the vegetable catalogue.

Frequently asked questions

What grows well next to tomatoes?

Basil is a good companion (said to improve the flavour of tomatoes and deter some pests), as are onions and garlic. Avoid planting near potatoes, though — both belong to the nightshade family and are susceptible to the same late blight, which spreads easily between them.

What shouldn't you plant next to onions and garlic?

Allium plants (onion, garlic, chives) suppress the growth of legumes, including beans and peas — a documented allelopathic effect. Keep them in separate beds, ideally with other vegetables in between.

What is allelopathy in the garden?

Allelopathy is the phenomenon where one plant releases chemical compounds into the soil that suppress the growth of other plants nearby — it's not a myth, but a mechanism documented in research. A classic example is the walnut tree, whose roots release juglone, which is highly toxic to many plants, including tomatoes growing beneath its canopy.