Basil planted next to tomatoes is not just a kitchen pairing. It is a garden pairing backed by real pest deterrence data. The methyl eugenol in basil leaves repels aphids, whiteflies, and tomato hornworm moths. This is companion planting at its most practical.
But not every herb combination works. Plant dill next to fennel and they will cross-pollinate, producing seeds with muddled flavor. Put mint in a raised bed with anything else and the mint will take over within a single season.
This guide covers the specific herb pairings that help each other, the ones that cause problems, and how to lay out your herbs in raised beds and containers for the best results.
Herb Pairings That Work Well Together
Basil + Tomatoes + Parsley
The classic trio. Basil repels aphids and whiteflies from tomato plants. A 2010 study published in the Journal of Chemical Ecology found that basil’s volatile compounds reduced thrips populations on neighboring plants by up to 30%.
Plant basil 12 inches from tomato stems. Tuck parsley at the base of the tomato cage where it benefits from afternoon shade. All three prefer the same conditions: full sun (6 to 8 hours), consistent moisture, and rich soil with a pH of 6.0 to 7.0.

Rosemary + Sage + Thyme + Lavender
These four Mediterranean herbs share the same growing requirements: full sun, lean or sandy soil, infrequent watering, and excellent drainage. Group them together and you only need one watering schedule.
Rosemary and sage are both in the Salvia family. They tolerate drought and prefer soil pH between 6.0 and 7.5. Thyme makes an excellent ground cover around taller rosemary and sage plants, suppressing weeds and retaining some soil moisture. Lavender adds pollinator appeal, drawing bees that will also visit your vegetable flowers.
Plant rosemary and sage 18 to 24 inches apart. Fill gaps with thyme and low-growing lavender varieties like Lavandula angustifolia ‘Hidcote’ or ‘Munstead.’
Chives + Carrots
Chives repel carrot rust fly, one of the most damaging carrot pests. The sulfur compounds in chive leaves mask the scent of carrot foliage, making it harder for the flies to find their target.
Plant a border of chives around your carrot bed. Space chive clumps 6 inches apart. This also works with garlic chives (Allium tuberosum), which are slightly more pungent.
Cilantro + Spinach + Peas
Cilantro bolts fast in heat, but it does well in the cooler conditions where spinach and peas also thrive. Plant all three in early spring or fall. Cilantro’s flowers attract beneficial insects, including lacewings, hoverflies, and parasitic wasps that prey on aphids.
Let some cilantro bolt on purpose. The flowers are excellent for attracting beneficials, and the resulting coriander seeds are a bonus harvest.
Dill + Cabbage Family Crops
Dill attracts braconid wasps and ladybugs, both of which feed on cabbage worms and aphids. Plant dill near broccoli, kale, Brussels sprouts, or cabbage.
Space dill plants 12 inches from brassicas. One important exception: keep dill away from carrots. They are in the same family (Apiaceae), and dill can cross-pollinate with carrots if both go to seed.
Oregano + Peppers
Oregano planted as a ground cover around pepper plants repels aphids and provides living mulch that keeps the soil cool and moist. Greek oregano (Origanum vulgare var. hirtum) has the strongest pest-repellent properties due to its high carvacrol content.
Plant oregano seedlings 8 to 10 inches from pepper stems. Let it spread to fill the gaps. Both prefer full sun and well-drained soil.

Herbs to Keep Separate
Mint (All Types)
Mint is the number one herb that needs its own space. Spearmint, peppermint, chocolate mint, apple mint. They all spread through underground runners (stolons) and will choke out neighboring plants within one growing season.
Grow mint in its own container. A 12-inch pot is the minimum. Even in raised beds, mint runners will escape under dividers, through drainage holes, and into adjacent beds. It is not a question of if but when.
If you want mint in a raised bed, sink a bottomless 5-gallon bucket into the soil and plant the mint inside it. This contains the roots for about two years before they find a way out.
Fennel (Foeniculum vulgare)
Fennel is allelopathic. Its roots release compounds that inhibit the growth of many other plants, including most herbs and vegetables. A study in the journal Weed Research confirmed that fennel root exudates suppressed germination in lettuce, tomato, and several herb species.
Grow fennel at least 4 feet from your herb garden, or give it its own dedicated container. It does pair acceptably with dill at a distance, but be aware they can cross-pollinate.
Rue (Ruta graveolens)
Rue and basil are not compatible. Rue releases volatile oils that stunt basil growth. It also conflicts with sage. If you grow rue (useful as an ornamental and for pest deterrence), plant it at the far edge of the garden.
Dill and Fennel Together
Dill and fennel look similar and are related. Planted near each other, they cross-pollinate freely. The resulting seeds lose the distinct flavor of each herb. Keep them at least 10 feet apart, or grow them in separate seasons.
Cilantro and Fennel Together
Same family dynamics apply. Cilantro planted near fennel tends to bolt faster, and fennel’s allelopathic properties can stunt cilantro growth. Keep these separated.
The Science Behind Companion Planting
Companion planting works through several documented mechanisms:
Volatile organic compounds (VOCs). Aromatic herbs release chemical compounds from their leaves that repel specific insect pests. Basil’s linalool and methyl eugenol deter whiteflies. Rosemary’s 1,8-cineole repels bean beetles. These are not folk tales. They are measurable chemical interactions published in entomology and agricultural journals.
Trap cropping. Some herbs attract pests away from your main crops. Nasturtiums (technically an edible flower, not an herb) draw aphids away from beans and tomatoes. Dill attracts tomato hornworm moths, which can be useful if you prefer to hand-pick them from the dill rather than hunt through tomato foliage.
Beneficial insect habitat. Herbs in the carrot family (cilantro, dill, parsley, fennel) produce umbrella-shaped flower clusters called umbels. These are landing pads for parasitic wasps, hoverflies, and lacewings, all of which eat pest insects. Letting a few herbs flower is one of the most effective organic pest management strategies.
Root zone sharing. Mediterranean herbs (rosemary, thyme, sage, lavender) have deep, drought-tolerant root systems. Shallow-rooted herbs like basil and cilantro can grow nearby without competing for the same water and nutrient zones in the soil. Pairing deep and shallow rooters reduces competition.

Layout for a 4x8 Raised Bed
Here is a specific planting plan for a standard 4-by-8-foot raised bed:
Back row (north side, tallest plants): Two rosemary plants, spaced 24 inches apart. One sage plant between them.
Middle row: Three basil plants spaced 12 inches apart. Two parsley plants on each end.
Front row (south side, shortest plants): Thyme as a continuous border, planted every 8 inches. Oregano at the corners.
Container on the side: One pot of mint, set on the ground next to the raised bed. Not in it.
This layout groups the Mediterranean herbs (rosemary, sage, thyme) along the back where they get full sun and drier conditions, while basil and parsley occupy the middle where the soil stays more consistently moist.
Container Companion Planting
For balcony or patio gardens, group herbs by water needs:
Pot 1, “The Dry Mediterranean” (large terracotta, 16+ inches): Rosemary in the center, thyme around the edges, one sage on the side. Water once a week or when the top 2 inches of soil are dry. Use a gritty, fast-draining potting mix with added perlite.
Pot 2, “The Thirsty Trio” (large plastic or glazed pot, 14+ inches): Basil in the center, parsley around it, cilantro on one side. Water every 2 to 3 days. Use standard potting mix with compost.
Pot 3, “The Loner” (12-inch pot, any material): Mint, by itself. Water every 2 to 3 days. Mint will fill this pot completely by midsummer.
Pot 4, “The Pollinator Pot” (12-inch pot): Oregano and chives together. Both tolerate moderate watering and full sun. The oregano flowers attract bees, and chive blossoms are edible.
Common Mistakes to Avoid
Planting everything in the same bed with the same watering schedule. Rosemary needs dry conditions. Basil needs consistent moisture. Growing them side by side means one of them will always be unhappy.
Ignoring mature plant sizes. A rosemary plant can reach 4 feet tall and 3 feet wide in warm climates. A single sage plant spreads 2 feet. Plan for full-grown dimensions, not the size of the transplants at planting time.
Letting mint “have just a little corner” of the raised bed. It will not stay in its corner. It will not respect boundaries. Contain it.
Planting dill directly next to tomatoes. Some guides recommend this, but mature dill can actually inhibit tomato growth. Young dill is fine. Once dill reaches full size and flowers, move it away from tomatoes or pull it.
Quick Pairing Reference
| Herb | Good Companions | Bad Companions |
|---|---|---|
| Basil | Tomatoes, parsley, peppers, oregano | Rue, sage (some conflict) |
| Rosemary | Sage, thyme, lavender, beans | Basil (different water needs) |
| Mint | Nothing. Give it its own pot. | Everything in the ground |
| Dill | Cabbage, broccoli, kale, lettuce | Carrots, fennel, mature tomatoes |
| Cilantro | Spinach, peas, beans, lettuce | Fennel |
| Thyme | Rosemary, sage, lavender, cabbage | No major conflicts |
| Oregano | Peppers, tomatoes, beans | No major conflicts |
| Chives | Carrots, tomatoes, roses | Beans, peas |
| Sage | Rosemary, thyme, cabbage, carrots | Cucumbers, rue |
| Parsley | Tomatoes, basil, asparagus | Lettuce (some competition) |
Start with the pairings you already use in the kitchen. Basil and tomatoes. Cilantro and peppers. Rosemary and sage. If they taste good together on the plate, chances are decent they grow well together in the garden.

