Cucumbers repay a little planning around what grows beside them. Cucumber plants need full sun, soil with a pH of 6.0–7.0, 36–48 inches of space and 50–70 days to reach maturity, so their neighbours need to suit the same bed and the same season. This guide lists the companions for cucumbers from our crop data, how each one is thought to help, and which close relatives to keep apart.
There are 5 companions listed for cucumbers here: beans, corn, peas, marigolds, dill. Companion planting is traditional garden practice rather than proven science, so benefits below are described in those terms — what gardeners have long said and done. Cucumbers are in the Cucurbitaceae family, need moderate water, and are sown directly or started indoors; it is tender, so frost will kill it and it should only go outside once all danger of frost has passed. Check any pairing first with the companion-planting finder.
Best companion plants for cucumbers
| Companion | Why it is grown with cucumbers |
|---|---|
| Beans | Legumes that fix nitrogen from the air into the soil through their roots, which can benefit a hungry neighbour such as cucumbers. |
| Corn | Grows tall and can give light shade or a windbreak. Plant on the north side so it does not shade cucumbers. |
| Peas | Legumes that fix nitrogen in the soil; light, airy growth rarely shades out neighbours. |
| Marigolds | Grown as a border or dotted through the bed; roots are traditionally said to discourage some soil pests, and flowers attract beneficial insects. |
| Dill | Flowers attract beneficial insects, including hoverflies and predatory wasps. Let a few plants flower at the bed edge. |
Marigolds work best as a border around the cucumbers bed rather than scattered at random. A ring of marigolds marks the bed edge, flowers for months, and is traditionally said to discourage some soil pests through its roots. They tolerate the same full sun as cucumbers, and one sowing covers the whole season if you deadhead spent flowers.
How companion planting works
Companion planting works through four overlapping mechanisms.
Pest confusion. Many pests find their host plant by scent. Strong-smelling companions such as onions, basil and aromatic herbs are traditionally said to mask that scent, so the pest passes by. It is a delaying effect, not a barrier.
Pollinator and beneficial-insect attraction. Several companions here flower — marigolds, dill — drawing pollinators and beneficial insects in. Let a few flower.
Nitrogen fixing. Nitrogen fixing applies directly here: cucumbers' companions include a legume, which captures nitrogen from the air into the soil.
Ground cover and root layers. No companion here is a ground-cover plant, so mulch does that job instead. Deep roots beside shallow ones also compete less for water and nutrients.
None of this replaces the basics. Spacing, watering, rotation and weekly inspection matter more than any pairing.
Plants to avoid near cucumbers
The plants to keep away from cucumbers are its own relatives. Cucumbers belong to the Cucurbitaceae family, and plants in the same family share the same pests and diseases — here, cucumber beetles, aphids, squash bugs — so problems pass easily between them and build up in the soil.
| Plant to avoid | Why |
|---|---|
| Zucchini | Same Cucurbitaceae family; shares pests such as cucumber beetles, aphids, squash bugs. |
| Butternut Squash | Same Cucurbitaceae family; shares pests such as cucumber beetles, aphids, squash bugs. |
| Pumpkins | Same Cucurbitaceae family; shares pests such as cucumber beetles, aphids, squash bugs. |
| Yellow Squash | Same Cucurbitaceae family; shares pests such as cucumber beetles, aphids, squash bugs. |
Keep these relatives in a different bed and rotate the Cucurbitaceae family to fresh ground each year. Others in the same family in our crop data include Spaghetti Squash, Watermelon, Cantaloupe, Honeydew Melon.
Planting layout and spacing
Give cucumbers their full spacing of 36–48 inches between plants. Crowded cucumbers mean poor airflow, more disease and smaller harvests, and no companion plant compensates for it. Work out how many plants fit your bed with the plant-spacing calculator or the square-foot garden planner.
Plant companions in the spaces the spacing leaves, not instead of it. Low companions go in the gaps and along the bed edges; taller ones go at the north side so they do not shade the cucumbers; scented herbs go closest to the crop, dotted through the row.
Cucumbers can be sown directly or started indoors. Starting indoors gives an earlier crop; direct sowing is simpler and avoids transplant shock. Germination takes 7–10 days either way. Cucumbers need full sun and soil with a pH of 6.0–7.0. Water needs are moderate, so keep the soil consistently moist with deep, regular watering rather than a light daily sprinkle, and mulch thickly to hold moisture in. The watering calculator gives a starting point for your bed size. Expect 50–70 days from sowing to maturity.
Common problems and fixes
The pests most often reported on cucumbers are cucumber beetles, aphids, squash bugs, powdery mildew. Companions may reduce pressure, but they do not prevent them — inspect leaf undersides and new growth weekly and act while numbers are low.
| Problem | What you see | First fix |
|---|---|---|
| Cucumber beetles | Striped or spotted beetles chew leaves and flowers. | Row cover until flowering; hand-pick in the morning. |
| Aphids | Sap-sucking insects on new growth; leaves curl. | Wash off with water; encourage ladybirds. |
| Squash bugs | Flat grey-brown bugs suck sap; bronze eggs on leaf undersides. | Scrape off egg clusters; hand-pick adults. |
| Powdery mildew | A white powdery coating on leaves in warm, humid weather. | Space for airflow; water at the base. |
Cucumber beetles
Cover young plants with row cover until flowering, then hand-pick beetles in the morning.
Aphids
Wash them off with a strong jet of water and leave ladybirds and lacewings alone to eat them.
Squash bugs
Check leaf undersides weekly, scrape off egg clusters, and hand-pick adults.
Powdery mildew
Space plants so air moves freely, water at the base in the morning, and remove badly affected leaves.
Unsure what you are seeing? Try the pest-identifier helper or the plant-disease checker. Remove badly affected leaves and rotate the Cucurbitaceae family next year.
Frequently asked questions
What is the best companion plant for cucumbers?
The most widely recommended companion is beans. Legumes that fix nitrogen from the air into the soil through their roots, which can benefit a hungry neighbour such as cucumbers.
What should not be planted near cucumbers?
Avoid other members of the Cucurbitaceae family, including Zucchini, Butternut Squash, Pumpkins. They share the same pests and diseases as cucumbers, so problems move easily between them. Rotate the family to a fresh bed each season.
Can I plant cucumbers with corn?
Yes. Corn is on the companion list for cucumbers. Grows tall and can give light shade or a windbreak. Plant on the north side so it does not shade cucumbers.
How far apart should cucumbers and their companions be planted?
Space cucumbers plants 36–48 inches apart, and put companions in the gaps, along the edges and at the ends of rows. The plant-spacing calculator works out how many plants fit your bed.
Does companion planting replace pest control?
No. It may reduce pest pressure, but it does not replace inspection, spacing, watering, rotation and good airflow. Check plants weekly and act early.