Companion Flowers and Herbs in the Vegetable Garden

Learn which flowers and herbs support beneficial insects, when a trap crop makes sense, and how to mix companions into a vegetable bed without crowding crops.

By · Reviewed by LeafyPixels Review Board · Published · Updated · 16 min read

Tomatoes, basil, and marigolds growing together in a raised vegetable bed

Flowers and herbs can make a vegetable garden more useful, but the best choices depend on the job you want them to do. A low flower that feeds hoverflies, a flowering dill plant that brings in tiny parasitoid wasps, and a nasturtium patch used to monitor aphids are three different tools—not interchangeable “pest-repelling companions.”

Start with a crop or garden problem: aphids on lettuce, caterpillars on brassicas, a need for more pollinator visits, or an empty bed edge. Then choose a plant that fits the space and blooms when it matters. Companion planting adds habitat and options; it does not replace healthy growing conditions, crop rotation, physical barriers, or regular pest checks.

What companion flowers and herbs can do

“Companion planting” is used for several practices: growing compatible crops together, adding flowers for beneficial insects, disguising a crop’s cues, or planting a sacrificial crop that attracts a pest. That distinction matters because a flower can be useful even if it does not repel anything. The strongest approach is to match the plant to a plausible mechanism and keep expectations proportional to the evidence.

Penn State Extension’s research-based guide describes herbs that can mask crop cues, interfere with pest egg-laying, or provide pollen and nectar for natural enemies. The University of Delaware Cooperative Extension also cautions that a diverse planting can raise beneficial-insect numbers without necessarily reducing pests on a particular crop: the predators may not reach the plant that needs protection, and extra plants can compete for resources. Treat a companion as one part of a garden system, not as a stand-alone treatment. (Penn State Extension; University of Delaware Cooperative Extension)

Feed beneficial insects

Many adult hoverflies and small parasitoid wasps use nectar or pollen. Some of their larvae or offspring then attack aphids and caterpillars, so flowers can support the life stages that help limit pests. Lady beetles and lacewings also visit flowers, while their larvae are familiar predators of soft-bodied insects. A flower does not recruit a guaranteed army; it supplies food and habitat that can make a garden more welcoming to insects already in the area.

Small, open flowers are often easier for tiny beneficial insects to use than deep, tubular blooms. Sweet alyssum is a particularly practical bed-edge choice: Delaware Extension describes it as low-growing, compact, long-flowering, and used in vegetable beds to attract syrphid flies. Flowering dill, cilantro, fennel, and calendula can also provide accessible blooms. Penn State specifically recommends dill, cilantro, or fennel near lettuce and other greens to support aphid-eating beneficial insects, and calendula near collards for predators that feed on aphids.

Make crops harder to find

Many plant-feeding insects use sight and smell to locate a host crop. A diverse planting can interrupt those cues; a strong-smelling herb or a bushy neighbor may make a single row of the preferred host less obvious. This is a possible form of pest disruption, not a force field around each vegetable. It works best as part of a mixed bed with healthy, properly spaced crops and ongoing observation.

Penn State describes basil near tomatoes as a way to mask tomato cues from thrips, and notes research in which basil around tomatoes reduced egg-laying by adult tomato hornworms. It also reports that thyme under tomato plants can discourage egg-laying by yellow-striped armyworm moths. Those examples are more precise than saying “basil repels bugs”: they name a crop, a plant partner, and a type of effect. A tomato may still get thrips or hornworms, and the result in one setting should not be promised for every garden.

Support pollination

Flowers bring pollinators into a garden where they can visit flowering vegetables, herbs, and nearby fruit crops. The value varies by crop: leafy crops harvested before they flower do not need insect pollination for the leaves you eat, while fruiting crops such as squash depend heavily on flower visits. A flowering border can support pollinators, but it cannot correct poor bloom overlap, extreme weather, or a lack of suitable habitat across the wider neighborhood.

Let a few culinary herbs flower if the goal is to feed insects. Penn State notes that blooming rosemary, oregano, basil, and thyme attract several species of sweat bees; those bees may then visit nearby crops. You do not need to give up your harvest: pinch most stems on one plant for leaves and allow a second plant or a few branches to bloom. Staggering flowers across the season is more useful than having a large burst of bloom that ends before the vegetable crop needs visitors.

Use trap crops with a plan

A trap crop is a plant grown to attract a particular pest away from a more valuable crop. Nasturtiums are often used as an aphid-attracting sacrificial plant, but the pairing only makes sense if aphids are a recurring problem and you will check the plants. If the trap crop is ignored, it can turn into a pest reservoir rather than a useful diversion.

Put a small trial at the bed edge or in a nearby pot, and establish it before the pest typically appears. Inspect both the trap crop and the vegetables at least weekly during the risk period. If aphids gather on nasturtiums, decide what you will do next—remove an infested stem, crush a small colony, or preserve the plant while watching for predators. GrowVeg’s practical trap-cropping guidance stresses that the right plant depends on the pest, the trap crop must be established in time, and an overrun trap crop may need to be removed; use those as planning prompts, not a guarantee that aphids will stay put. (GrowVeg)

Kale growing beside flowering nasturtiums in a vegetable bed

Choose plants by function

A good companion is one that fits the crop’s light, moisture, and spacing needs while doing something useful in the time it is planted. Use the list below as a shortlist, then check whether the flower will bloom during the crop’s vulnerable period and whether it can be reached for harvesting and pest checks. Practical flower lists, including the Old Farmer’s Almanac’s companion-flower guide, offer ideas; evaluate each one by its specific role rather than assuming every named flower repels pests.

Low-growing annual flowers

Sweet alyssum is one of the easiest flowers to fit into a tight bed because it stays low and can flower for an extended period in suitable conditions. A few plants along an accessible edge or at the end of a short row can provide nectar without creating a tall screen over lettuce. Give seedlings enough room to spread, and keep a path clear so the border does not become a damp, tangled strip around the crop.

Calendula offers a larger flower and can serve as a useful insectary plant. Penn State cites calendula near collards for attracting beneficial predators that feed on aphids; Delaware Extension notes that marigolds may also support minute pirate bugs by supporting prey such as thrips. These observations do not mean all flowers in the marigold family deter all pests. If you grow marigolds, treat them as part of a diverse planting, not a pesticide substitute; the specific nematode use is stronger when selected marigolds are grown as a cover crop before vegetables, rather than scattered among established crops.

Nasturtiums combine edible flowers and leaves with a tendency to attract aphids. That makes them a possible trap-crop trial, not a no-maintenance pest barrier. Plant them where they will not sprawl over seedlings, and do not use them in a spot where their leaves will hide the base of vegetables you need to inspect. Borage is another popular choice in practical flower lists, but its size and self-seeding habit make a nearby patch or container easier to manage than a few plants squeezed into a narrow row.

The Old Farmer’s Almanac includes flowers such as nasturtiums, calendula, and borage in its practical companion-plant suggestions. Those lists can help you find candidates, but the presence of a pairing in a chart does not establish a pest-control effect in your specific bed. (The Old Farmer’s Almanac)

Flowering herbs

Dill, cilantro (coriander), and fennel produce small clustered flowers that can support insects when allowed to bloom. Penn State recommends these herbs near lettuce and other greens because they attract beneficial species that prey on aphids; the same source notes dill and cilantro near eggplant for beneficial insects that attack Colorado potato beetles. Keep those examples specific to the pests and crops named, and scout anyway.

Timing is the catch. Cilantro prefers cool weather and may bolt before a summer vegetable reaches peak growth, so sow it early or in successive small batches. Dill can grow tall and may shade nearby plants; put it where its mature height will not block light or access. Fennel can become a large, self-seeding plant, so a bed edge or separate container is often easier to manage than placing it in the middle of a compact vegetable row.

Thyme is a low herb with several crop-specific roles in Penn State’s guide, including discouraging egg-laying by some cabbageworms and loopers when planted with cole crops. It can also form a dense cover beneath tomatoes in a reported armyworm example. Use it only where you can maintain airflow and harvest access; a dense mat against the stems can make it harder to see damp soil, weeds, or early pest damage.

Basil, oregano, and rosemary are useful if you also want culinary herbs. Basil near tomatoes has a more specific research-backed role than generic “pest repellent” claims suggest, while blooming oregano and rosemary can add flowers for sweat bees. Their mature size and watering preferences differ, so keep them in separate pots or at an edge when that makes irrigation easier.

Perennials and border plants

Perennial herbs and native flowering plants can provide habitat over multiple seasons, but they belong where their long-term size will not crowd annual vegetables. A strip beside the bed or a nearby border is easier to maintain than a permanent plant inserted into the crop’s future rotation area. Choose species suited to your region and soil, and include plants that flower at different points in the growing season instead of relying on a single spring or summer flush.

Mint is the classic example of a useful herb that becomes a difficult neighbor. If you want mint for tea or pollinator flowers, grow it in a pot and keep that pot from rooting into the bed. The same principle applies to any vigorous perennial: separate it if the vegetable space needs to be replanted, dug, or rotated each year.

Match companions to the vegetable bed

Instead of asking whether a flower is “good” for vegetables, ask which crop, pest, or garden task it might support. This avoids planting a popular flower everywhere and helps keep companions from competing with a crop that needs open sunlight or frequent access.

Brassicas and leafy greens

For lettuce, spinach, and other greens with aphid problems, trial flowering dill or cilantro nearby and allow at least part of the plants to bloom. Penn State identifies these herbs as resources for several aphid-eating beneficial insects. If aphids are already abundant, remove badly infested leaves and use your normal integrated pest-management steps; a few flower stems will not erase a large colony overnight.

For collards, calendula has a specific support role in Penn State’s summary: it can attract beneficial predators that feed on aphids. For cabbage-family crops, dill, chamomile, hyssop, sage, and thyme appear in extension guidance for disrupting egg-laying by imported cabbageworms or loopers. These are useful small trials when those caterpillars have been a problem, but floating row covers, crop rotation, and regular checks may be more direct tools for protecting a crop.

Keep herbs at the row end or in a pocket where they will not narrow the space between brassica plants. The crop still needs room to grow, and dense foliage can trap moisture and hide caterpillars. If you are growing a small bed, choose one flowering herb rather than trying to fit every suggested companion around the same lettuce patch.

Tomatoes, peppers, and eggplant

Basil near tomatoes is a reasonable experiment because Penn State describes effects on thrips’ ability to locate tomatoes and hornworm egg-laying behavior. Plant basil where it will receive sun and where tomato leaves will not eventually smother it. Prune or stake the tomato according to its growth habit so both plants keep good air movement and you can inspect leaf undersides for eggs and feeding damage.

Penn State also includes cilantro and dill near eggplant as plants that can support natural enemies of Colorado potato beetle. A small flower patch or a few herbs near the bed is easier to maintain than crowding the eggplant’s root zone. For peppers, choose flowers for bloom and habitat value unless you have a specific, locally relevant pest pairing to test; a general claim that marigolds or basil will protect every pepper plant is too broad.

A useful combination may be tomato, basil, and a low flower such as alyssum at the edge, with one flowering dill plant behind the crop where its height will not cast unwanted shade. This is a layout choice, not a guaranteed companion “system.” If airflow, sun, or harvest access becomes worse, remove or move the companion even if the pairing looks attractive on paper.

Cucumbers, squash, and other sprawling crops

Squash and cucumber flowers draw bees, but the vines can take over the exact space reserved for annual companions. Leave a firm path for harvesting and pest inspection; place low flowers at the outside edge rather than under leaves that will soon cover them. If pollination is your goal, keep flowers in bloom near the crop while its male and female flowers are open, and avoid expecting a distant decorative border to solve a pollination problem by itself.

Nasturtiums can be tried at the edge of a squash patch if aphids are the pest you want to monitor. Do not assume they will trap squash bugs or vine borers just because they attract one kind of pest. The trap crop must be attractive to the target insect, and its success depends on the pest’s behavior and the layout. A few flowers along the walkway let you inspect the plant without stepping into the crop.

For sprawling crops, flowers can also mark bed boundaries and bring color to the harvest area. Choose compact annuals or use a container beside the bed. Avoid tall flowers where they will shade a trellised cucumber or squash leaves that already compete for light.

Root crops and small-space beds

Carrots, radishes, and beets do not need a flower beside each row. Their roots need a clear, workable strip of soil, so put herbs and flowers at the bed ends or outer edge rather than between tightly spaced seedlings. A flowering border can still support insects that move through the whole garden, but it is not a substitute for thinning root crops to the spacing they need.

A small raised bed has less room for experimentation than a broad garden. Choose one plant that does a job and one that you want to harvest, then observe how they grow together. A separate pot of mint or nasturtiums near the bed can give you flowers and herbs without taking root space from carrots or lettuce.

Place and time companions for the job

Put flowers where they can help without obstructing the crop: along the edge, at row ends, in open pockets, or in a nearby border. Keep tall plants behind or outside the sun path for lower vegetables, and preserve clear routes for watering, harvest, and inspection. Do not plant to a rigid distance copied from a chart; follow the mature spacing on seed packets or labels, then use any remaining area for smaller companions.

For nectar and pollen, aim for bloom during the period the crop flowers or the pest is active. A flowering herb that finishes in spring is less useful to a summer crop if no other flowers are available later. Succession-sow short-lived annuals, leave a few herb stems unharvested, or choose a mix with overlapping bloom times. For trap crops, establish the plant before the expected pest arrives; practical guidance from Harvest to Table and GrowVeg both emphasize timing and placement as parts of a trap-crop plan.

Avoid sowing flowers so densely that the bed loses airflow. Water at soil level when practical, keep stems from lying across vegetable foliage, and leave room to weed around the crop. If you use a pot for an aggressive herb or an aphid-attracting flower, place it close enough to inspect but far enough that it does not shade the crop or block a path.

Vegetable plants and companion flowers sharing a raised garden bed

Avoid common companion-planting mistakes

The most common mistake is treating “repels pests” as a universal property of a plant. Aromatic leaves do not automatically repel every insect, and a flower that feeds a beneficial insect may also host a pest. A more useful claim names the pest, crop, plant, and mechanism; if a source does not specify those, consider the pairing a garden experiment rather than a rule.

A second mistake is leaving a trap crop unmanaged. Nasturtiums that attract aphids need the same attention as the vegetables: check for a growing colony, look for predators, and remove badly infested growth if it threatens to spread. A trap crop can concentrate a pest as intended, but that concentration only helps if you act before the insects disperse.

Companions also use water, light, nutrients, and physical space. Delaware Extension cautions that added plants can reduce crop yield if they compete with the vegetable, and that beneficial insects attracted to one part of a planting may not reach the crop where they are needed. In a crowded bed, a clear walking lane, appropriate crop spacing, and an intact row cover are more valuable than one extra flower.

Finally, avoid invasive or overgrown choices and do not disturb a perennial vegetable row just to squeeze in a companion. Check local invasive-plant guidance before planting aggressive species, grow mint in a container, and let the vegetable’s mature size—not a companion chart—set the available space.

A simple first-season layout

For a modest raised bed, start with the vegetables you already want to harvest. Plant them at their recommended spacing first, then reserve a few edges or gaps for companions. For example, use a low band of sweet alyssum along one accessible edge, place a couple of dill or cilantro plants near lettuce where they can be allowed to flower, and add basil near tomatoes if those are part of the bed.

If aphids have repeatedly damaged a crop, test one small nasturtium patch just outside the most vulnerable row instead of scattering vines through the whole bed. Label it as a trial and check it every few days once aphids appear. If the nasturtiums become heavily infested and the aphids begin moving toward the vegetables, cut off the colonized stems and discard them away from the bed.

Keep one portion of the garden without that new companion if you can. Compare pest damage, beneficial-insect visits, crop growth, and harvest rather than judging only by how colorful the bed looks. A simple note such as “dill flowered before aphids arrived” or “nasturtiums shaded the lettuce” gives you a practical decision for next season.

Conclusion

Companion flowers and herbs are most useful when you know what job each one is meant to do. Choose accessible flowers such as alyssum, flowering herbs such as dill or cilantro, a crop-specific pairing supported by extension research, or a carefully monitored trap crop—not a generic promise that a plant will keep pests away.

Fit companions around the vegetable’s mature size, preserve airflow and harvest access, and watch what happens in your own garden. Start small, keep notes, and keep the flowers that support your crops without crowding them.

Frequently asked questions

Can you plant flowers next to vegetables?

Yes. Choose flowers that fit the crop’s mature spacing and bloom while the vegetables or beneficial insects can use them. Low-growing alyssum or a few flowering herbs can occupy bed edges, while tall or sprawling plants usually need a separate border.

Do marigolds really repel pests in a vegetable garden?

Not as a general rule. Delaware Extension describes marigolds supporting minute pirate bugs and notes a more targeted nematode use when selected marigolds are grown as a cover crop. A few marigolds beside vegetables should not be treated as broad insect protection.

Should I let herbs flower in my vegetable garden?

Let a few stems or a separate plant flower if you want nectar and pollen for insects; keep pinching the plants you are growing mainly for leaves. Dill, cilantro, basil, oregano, rosemary, and thyme can be useful flowering herbs, but match their bloom time and mature size to the bed.

Do nasturtiums protect vegetables from aphids?

Nasturtiums can attract aphids and may work as a trap-crop trial, but they do not guarantee aphids will stay away from vegetables. Grow them at the bed edge, inspect them regularly, and remove heavily infested growth if aphids begin spreading.

Where should I plant companion flowers in a small vegetable bed?

Start with vegetables at their recommended spacing, then use accessible edges, row ends, or a nearby pot for smaller flowers and herbs. Keep tall plants from shading vegetables, leave a path for harvest and scouting, and avoid letting mint or sprawling nasturtiums take over root space.

How the "Companion Flowers and Herbs in the Vegetable Garden" guide is reviewed?

Editorial policyReview board

Written by · Reviewed by LeafyPixels Review Board · Updated October 10, 2026

This "Companion Flowers and Herbs in the Vegetable Garden" guide was researched and written by . Recommendations in the "Companion Flowers and Herbs in the Vegetable Garden" guide are checked against multiple independent references before publication.

We prioritize sources that hold up under scrutiny:

  • University cooperative extension bulletins and fact sheets (Penn State, Clemson, UMD, NC State, and similar programs)
  • Botanical garden and horticultural society publications
  • Peer-reviewed plant science and veterinary toxicology references where pet safety matters (including ASPCA Animal Poison Control)
  • Established reference works on indoor plant culture

The LeafyPixels editorial team then reviews the draft for clarity, step-by-step usefulness, and fit with real apartment and home conditions-not ideal greenhouse setups. When guidance changes materially, we update the page and note the revision date.

What this guide covered

Guide recommendations are reviewed against relevant research, expert guidance, and practical constraints before publication.


Sources used

  1. GrowVeg (n.d.) Trap Cropping To Control Pests. [Online]. Available at: https://www.growveg.com/guides/trap-cropping-to-control-pests/ (Accessed: 10 October 2026).
  2. Harvest to Table (n.d.) Interplanting For Biocontrol Using Companion Plants To Reduce Pests In The Vegetable Garden. [Online]. Available at: https://harvesttotable.com/interplanting-for-biocontrol-using-companion-plants-to-reduce-pests-in-the-vegetable-garden/ (Accessed: 10 October 2026).
  3. Old Farmer’s Almanac’s companion-flower guide (n.d.) 9 Flowers That Make Great Companion Plants. [Online]. Available at: https://www.farmersalmanac.com/9-flowers-that-make-great-companion-plants (Accessed: 10 October 2026).
  4. Penn State Extension (n.d.) Herbs Make Good Plant Partners And Companions. [Online]. Available at: https://extension.psu.edu/herbs-make-good-plant-partners-and-companions (Accessed: 10 October 2026).
  5. University of Delaware Cooperative Extension (n.d.) Adding Diversity Garden. [Online]. Available at: https://www.udel.edu/academics/colleges/canr/cooperative-extension/fact-sheets/adding-diversity-garden/ (Accessed: 10 October 2026).