Good tomato companion plants do something useful without making life harder for the tomato. In a small garden, that might mean basil sharing similar sun and watering conditions, sweet alyssum providing flowers for beneficial insects, or lettuce using the cooler space beneath a tomato canopy before summer heat arrives.
What companion planting cannot do is turn a planter into a pest-proof bubble. Many traditional pairings are based on observation rather than strong research, and even the combinations that have been studied work best as part of a larger approach: healthy plants, enough root space, good airflow, regular scouting, and a mix of flowers and herbs nearby. University Extension guidance increasingly treats companion planting this way—as practical garden design rather than a rigid chart of plants that supposedly like or dislike one another.
That distinction matters on a balcony. One overloaded container can create more problems than a clever pairing solves. Below, I’ll focus on combinations that make sense for apartment gardeners, container growers, and raised-bed gardeners, including what to plant with tomatoes for beneficial insects, which herbs and vegetables share space reasonably well, and which neighbors are better kept in another pot.
What Companion Planting Can Actually Do for Tomatoes
The useful version of companion planting starts with a goal. You might want to fill unused soil near the edge of a raised bed, provide nectar for beneficial insects, harvest an herb from the same sunny corner, or make it slightly harder for certain pests to locate tomatoes.
Research summarized by University of Minnesota Extension shows that mixed plantings can influence insects through scent, visual confusion, and habitat for predators and parasitoids. In tomatoes specifically, some studies have found basil and marigolds can reduce thrips under certain conditions. Penn State Extension also reports research showing basil can interfere with thrips and tomato hornworm egg-laying behavior. That is useful evidence, but it does not mean one basil plant will prevent hornworms or eliminate thrips from a balcony.
I plan companions around three practical tests: Does the plant tolerate roughly the same sunny conditions? Will its roots and foliage leave enough room for the tomato? Does it provide something I actually value—flowers, herbs, groundcover, an early crop, or insect habitat?
Tomatoes themselves need substantial resources. Penn State recommends at least 6 hours of direct sun, while University of Maryland Extension lists 5 gallons as the minimum container volume for a standard tomato. Oregon State University likewise recommends at least a 5-gallon container for one tomato and notes that larger pots generally support stronger growth and production.
That is why I rarely cram several full-size companions into the same 5-gallon pot. On a balcony, a tomato in its own generous container with two or three companion pots clustered nearby is often the better version of companion gardening.

Herbs That Share Tomato Conditions Well
Basil is the herb I reach for first. It likes warmth, sun, and regular moisture, so its basic care overlaps well with tomatoes. Penn State Extension recommends full sun for basil and notes that it can be container-grown; research reviewed by Penn State also supports a role for basil in masking tomatoes from some pests.
That still does not make basil a living insecticide. I grow it because I use it in the kitchen, its flowers can feed pollinators when I allow a few stems to bloom, and it fits neatly near a tomato without becoming a huge structural plant.
- Basil: A strong all-around choice for sunny tomato areas. In a shared planter, keep enough open soil around the tomato stem for watering and airflow.
- Thyme: Low-growing and useful near the sunny edge of a bed or in its own smaller pot beside tomatoes. Penn State describes research in which thyme beneath tomatoes affected egg-laying by yellow-striped armyworm moths.
- Cilantro: Useful while temperatures are moderate. If you let some plants flower, the small blooms provide nectar and pollen for beneficial insects.
- Dill: Excellent for beneficial-insect habitat once it flowers, but mature dill takes more vertical room than basil. On a balcony, I usually give it a separate container rather than squeezing it beneath a tomato.
University of Maryland Extension specifically recommends flowering herbs such as basil, dill, and cilantro as resources for pollinators and natural enemies of garden pests.
A mistake I made early on was treating the tomato pot like vacant real estate. I tucked herbs into every visible gap, then wondered why the container needed water constantly in July. Now I treat the tomato as the main tenant. If the pot is only around the minimum size, companions go next door.
If you are building your first container setup, our container tomato growing guide can help with pot size, support, how often to water tomato plants, and placement before you add companions.

Flowers That Earn Their Space Near Tomatoes
If you want to plant flowers with tomatoes, choose them for bloom, insect habitat, and manageable size—not because a chart promises they will repel every pest.
Sweet alyssum is particularly useful in tight gardens. Its low growth makes it easier to fit along a bed edge or in a nearby container, and Penn State Extension lists sweet alyssum among plants that attract beneficial insects. University of Maryland also describes flowering plants with clusters of small blossoms as especially valuable to pollinators and natural enemies.
Marigolds deserve a place too, with one qualification. Their reputation is broader than the evidence. University of Minnesota Extension notes that studies have found basil and marigolds useful against thrips in tomatoes, while University of Maryland reports that African and French marigolds can deter some soil-dwelling nematodes. Neither source suggests that dropping a marigold into a tomato pot makes the tomato pest-free.
Calendula is another easy flower for mixed edible gardens, especially when you want a long-blooming companion rather than an aggressive plant. Nasturtiums can also work around the outside of a raised bed or trail from their own pot. Their strongest companion-planting research is associated with other crops, so I would grow them near tomatoes for flowers, edible blooms, and garden diversity rather than promise tomato-specific pest control.
For a small balcony, I would start with one flowering pot rather than five. A 10- to 12-inch container of alyssum, calendula, or a compact marigold can sit near the tomato without stealing its root space. Deadhead spent flowers when you want continued bloom, but allow a few herb or flower stems to remain open when your goal is feeding insects.
One pet note matters more than companion-plant folklore: the ASPCA lists the tomato plant itself as toxic to dogs and cats, although ripe fruit is listed as non-toxic. Basil and true garden nasturtium, Tropaeolum majus, are listed as non-toxic. Keep pets that chew plants away from tomato foliage regardless of which companions you choose.

Vegetables and Greens That Use the Gaps
The best vegetables to grow with tomatoes are usually the ones that occupy a different layer of the garden or finish before the tomato reaches full size.
Lettuce is a good example. University of Maryland and Oregon State Extension both suggest using the shade of taller crops such as tomatoes to help cool lettuce as the season warms. That is a much more useful reason to pair them than claiming the plants somehow improve each other chemically.
In a raised bed, sow lettuce or quick radishes near the outside edge while tomato plants are still small. You can harvest much of that crop before tomato roots and foliage occupy the space. Scallions can also use narrow edges reasonably well because they stay upright instead of forming a broad canopy.
Carrots are commonly listed as tomato companions, and they can coexist in a bed where there is adequate depth and spacing. I see them less as a pest-management tool and more as a way to use soil below a taller crop. For apartment gardeners, however, carrots plus a full-size tomato in one ordinary container usually creates more competition than benefit. Give that combination a deep raised planter rather than a cramped pot.
Try to leave the tomato’s lower stem accessible. I like enough open space to direct water onto the potting mix without soaking dense neighboring foliage. If leaves remain pressed together for hours after watering or rain, thin the companion planting rather than celebrating the extra greenery.

Build Container Pairings Around Root Space First
For anyone wondering what to plant with tomatoes in a container, my first answer is often: plant the tomato generously, then put most companions in neighboring pots.
University of Maryland Extension lists 5 gallons as the minimum volume for a standard tomato, and its container guidance points out that wider pots of the same volume are more stable in a breeze. Oregon State also recommends one tomato per container of at least 5 gallons and notes that bigger containers offer more root room.
A 5-gallon pot is therefore not a 5-gallon tomato plus basil plus marigold pot. It is already close to the minimum for the tomato itself. -> Container Size Calculator will be useful.
If you want companions in the same container, use a genuinely large planter and keep the additions modest. In a 15- to 20-gallon container, for example, one tomato plus a small basil plant near the outer edge is much more realistic than combining a tomato with several full-size herbs and flowers. That is a practical small-space rule rather than a universal horticultural formula; the exact capacity depends on tomato type, container dimensions, climate, and how consistently you can water.
Containers dry faster than in-ground beds. University of Minnesota Extension recommends checking container moisture frequently and watering when roughly the top inch of mix feels dry. Self-watering containers can also help maintain more consistent moisture; University of Maryland notes that reservoir-style containers conserve water and can reduce how often you need to attend to the pot.
On exposed balconies, stabilize the tomato before decorating around it. Use a wide-based container, install the cage or stake while the plant is young, and keep heavy pots where your building permits them. Do not assume a railing, planter bracket, or balcony floor can carry a particular load—follow your building or lease rules for weight and fastening.

Use Raised Beds for Complementary Growth, Not Maximum Density
A raised bed gives you more flexibility because companions can occupy edges and temporary gaps without being trapped in the same small root ball.
I like to think vertically. Tomatoes take the upper layer. Lettuce or short herbs use lower space while conditions suit them. Flowers go along an outer edge where insects can reach them and where I can trim them without crawling under tomato cages.
- Keep vigorous tomato plants separated enough that mature foliage is not packed into one solid wall.
- Place early lettuce or radishes where they can be harvested before tomato roots and shade dominate.
- Use basil in reachable spots so regular harvesting also keeps it compact.
- Put alyssum or other small flowers along an edge rather than burying them under the tomato canopy.
- Leave a clear route for watering at soil level.
Companion planting should not erase normal tomato care. Dense foliage that blocks airflow can encourage long periods of leaf wetness, and splashing water can move disease-causing organisms onto lower leaves. Penn State Extension recommends adequate spacing and keeping foliage dry as part of tomato disease prevention.
For a 4-by-4-foot raised bed, I would rather grow one or two well-supported tomatoes with purposeful smaller companions than force four tomatoes plus a dozen herbs into the space. A productive bed is not necessarily the bed with the most stems.

What Not to Plant With Tomatoes
The most useful answer to what not to plant with tomatoes is less dramatic than many companion charts suggest. I would avoid plants that create excessive competition, block airflow, or share important diseases—not plants accused of vague incompatibility.
Potatoes are the clearest example. Tomatoes and potatoes can both host late blight, and Penn State Extension documents the disease in both crops. They also occupy substantial root and foliage space. In a small raised bed or balcony setup, I would separate them rather than create a dense concentration of susceptible plants.
Peppers and eggplants are tomato relatives too. That does not mean a pepper magically harms a tomato. It means several related crops can share some pests and diseases, and grouping them tightly gives you fewer options if trouble develops. Penn State recommends rotating tomatoes and related vegetables such as potatoes, peppers, and eggplants when garden space allows.
I also keep aggressive or oversized plants out of a tomato’s immediate root zone. A mature squash can occupy an enormous patch of a raised bed. Corn creates a tall competing canopy. Mint can spread aggressively when planted in open soil. None of these is an evil companion; they are simply awkward roommates when square footage is limited.
Be skeptical of blanket warnings about brassicas, carrots, beans, or other vegetables being chemically incompatible with tomatoes unless a reliable source explains the actual mechanism. University Extension companion-planting guidance focuses instead on growth pattern, timing, light, water, nutrients, disease, and insect interactions.
For small gardens, that is the rule I trust: if a plant crowds the tomato, steals the sun, keeps leaves damp, needs radically different watering, or concentrates a shared disease problem, move it.

Common Mistakes to Avoid
I learned the biggest companion-planting lesson the hard way on an early balcony setup: more plant varieties did not create a healthier mini-ecosystem. They created a pot I had to water constantly and a jungle where I could barely see the lower tomato leaves.
The tomato still needs to be the priority crop.
- Stuffing companions into a minimum-size tomato pot: Give a standard tomato at least the roughly 5-gallon minimum recommended by Extension guidance, and go larger where practical. Put extra companions in separate pots when root room is tight.
- Expecting flowers to eliminate pests: Flowers can support predators, parasitoids, and pollinators, but inspect tomato leaves at least once or twice a week anyway. Check undersides, new growth, and fruit clusters.
- Ignoring mature plant size: A 4-inch dill transplant does not stay 4 inches tall. Plan for the plant you will have in midsummer, not the one you bring home in spring.
- Creating a damp wall of leaves: If companion foliage presses constantly against tomato leaves, prune or relocate the smaller plant. Air movement matters more than filling every gap.
- Choosing companions with opposite moisture needs: Tomatoes need fairly consistent moisture. A drought-loving perennial herb may be easier to manage in its own container rather than sharing the same wet-dry cycle.
Another common mistake is reaching for broad-spectrum insecticides the moment you see insects near your flowers. Some of those visitors may be beneficial, and pesticides—including some products marketed as natural or organic—can harm pollinators. Learn the pest first and choose the least disruptive control that fits the actual problem. Penn State Extension emphasizes conserving beneficial insects as part of pest management.
A Simple Tomato Companion Plan for Small Spaces
You do not need a complicated companion planting diagram to get the benefits. For a sunny apartment balcony, a three-container setup is enough to start.
Put one tomato in a sturdy container of at least 5 gallons, preferably larger if space and building rules allow. Add its support when you plant rather than waiting until the root system fills the pot. Keep one basil plant in its own 8- to 12-inch pot nearby, and use another small pot for sweet alyssum, calendula, nasturtium, or a compact marigold.
That arrangement gives you three advantages at once: tomato roots keep their own growing space, basil provides an edible herb with compatible warm-season preferences, and the flowers contribute nectar and pollen without turning the tomato container into a competition experiment.
On a raised bed, use the same principle in layers. Tomatoes are the structural crop. Basil or another manageable herb sits between or near them without blocking access. A narrow flowering strip runs along the sunny edge. Early lettuce can occupy cooler gaps temporarily and come out when tomatoes begin filling the bed.
If your main goal is attracting pollinators and beneficial insects, our balcony pollinator garden guide is a useful next step. A season-long sequence of flowers is more valuable than expecting one companion plant to handle every insect problem.
Sources for these recommendations include University of Minnesota Extension, University of Maryland Extension, Oregon State University Extension, Penn State Extension, and the ASPCA.

Choose Companions That Make the Tomato Easier to Grow
The best companion plants for tomatoes are not the ones attached to the longest list of promises. They are the plants that fit your available light, water, plant space, and growing style while adding something genuinely useful.
For most small-space gardeners, basil is an easy edible partner. Sweet alyssum and other modest flowering plants can provide resources for beneficial insects. Lettuce can take advantage of temporary space and partial shade in a raised bed. Marigolds have some research behind specific pest interactions, but they are helpers rather than shields. Most importantly, every companion should leave the tomato enough room to receive light, airflow, water, nutrients, and sturdy support.
If you are unsure what to plant with tomatoes, start smaller than you think. One healthy tomato, one useful herb, and one flowering companion can teach you more than an overcrowded collection of supposed perfect pairings.
Watch how the plants behave through heat, wind, and midsummer growth. If a companion begins competing with the tomato, move the pot or harvest it. Companion gardening works best when it stays flexible—and on a balcony, flexibility is one of the biggest advantages you have.



