Fungus Gnats vs. Shore Flies: How to Tell These Look-Alike Pests Apart (and Why It Matters)
Fungus gnats and shore flies look similar but damage plants differently and need different fixes. Here's how to tell them apart before you treat.
You spot a tiny fly hovering near your houseplants and your first thought is fungus gnats. Fair enough — they're one of the most common indoor plant pests. But there's another small fly that shares the same damp-soil habitat, looks almost identical at a glance, and causes an entirely different kind of trouble: the shore fly. Reaching for the wrong treatment wastes time, money, and sometimes stresses your plant further. The single most useful thing you can do before you treat anything is make sure you've identified which fly you're actually dealing with.
This guide walks through every reliable difference between the two insects — adult body shape, wing markings, flight behavior, and larval appearance — so you can make a confident identification from what you can actually observe at home. The control strategies diverge sharply, so getting the ID right is the whole game.
Adult appearance: the details that give each fly away
Both flies are roughly the same size — about 1/8 inch long — which is why they're so easy to confuse. But look a little closer and the differences are clear.
Fungus gnats (Bradysia spp.) have a distinctly mosquito-like silhouette: a slender body, long dangling legs, long antennae, and a single pair of delicate, clear wings. The clearest field mark is a "Y"-shaped vein visible in each wing — a feature that takes good lighting or a magnifying glass to see, but is unique to fungus gnats. Their overall color is dark grey to black, but the transparency of the wings gives them a lighter, more delicate look than a shore fly.
Shore flies (Scatella stagnalis and related species) look more like a stocky fruit fly than a mosquito. The body is dark grey and noticeably more robust, the legs are short, and the antennae are short. Most importantly, their wings are dark grey and marked with five distinctive whitish spots — a pattern that, once you know to look for it, makes shore flies unmistakable. No Y-vein, no long legs, no clear wings: if you see those five pale dots on dark wings, you're looking at a shore fly.
Behavior: how each fly moves and where it hangs out
Flight behavior is often the fastest clue when you can't get a close look at wing venation or spot patterns.
Fungus gnats are weak, hesitant fliers. They tend to run and scuttle across the soil surface or crawl over leaves and other nearby surfaces rather than taking off decisively. They're drawn to light, so you'll often find them drifting toward windows or resting on the glass near your plants — which is one reason they're the fly houseplant owners encounter most frequently.
Shore flies are strong, confident fliers and tend to take off quickly when disturbed. In commercial greenhouses they're associated with algae-covered surfaces, stagnant water, moist benches, and greenhouse floors — environments that are uncommon in most homes. If you're seeing tiny flies indoors that buzz away fast and you don't have obvious algae growth anywhere, you're much more likely to be looking at fungus gnats. Shore flies in homes are rare; they become a real problem primarily in greenhouses or very wet growing environments with algae buildup.
Larval signs: what's happening under the soil surface
If you want a definitive identification — or you want to confirm an infestation before adult flies become obvious — checking for larvae is the most reliable method.
Fungus gnat larvae are white and legless, up to about 1/4 inch long when fully grown, with a shiny black head capsule that makes them easy to spot against white or light-colored potting mix. A simple and effective way to check for them is to press a small cube or slice of raw potato slightly into the soil surface and leave it for a day or two. Fungus gnat larvae are attracted to the potato and will gather on the underside of the slice, where you can inspect and count them. This potato trap technique specifically targets root-zone feeders — exactly where fungus gnat larvae live.
Shore fly larvae look quite different: the body is opaque and tannish-brown rather than white, and crucially, there is no distinct head capsule. At the rear end of the larva you'll find two dark-colored openings called spiracles (part of a breathing tube), which is a distinctive structural feature absent in fungus gnat larvae. Shore fly larvae don't burrow into root zones; they develop in algae-covered surfaces, so a potato trap placed in the root zone won't detect them.
If your potato trap comes back with white larvae with black heads, you have fungus gnats. If the soil surface has algae or a greenish crust and you're seeing tannish, headless larvae there, shore flies are the more likely culprit.
Damage profile: why the distinction actually matters
This is the practical reason identification comes before treatment. The two flies cause fundamentally different problems, and what controls one may do nothing to the other.
Fungus gnat larvae are the damaging life stage. They feed on organic matter in the soil but also chew on plant roots and root hairs, with young seedlings and cuttings being most vulnerable. Beyond direct feeding damage, their activity can open wounds in root tissue that make plants susceptible to soil-borne pathogens. Research has shown that fungus gnat larvae are capable of directly transmitting fungal diseases including Pythium, Fusarium, and Verticillium from infected to healthy plants — so a fungus gnat infestation in stressed or recently repotted plants is a meaningful plant-health concern, not just a nuisance.
Shore flies, by contrast, are primarily a nuisance pest. The adults defecate on leaves, leaving black specks on foliage that are cosmetically unpleasant and can occasionally affect the appearance of ornamental plants significantly enough to slow the growth of young cuttings. Shore fly larvae develop in algae rather than root zones, so they don't cause the direct root damage that fungus gnat larvae do.
The treatment gap is equally important: soil drenches and biological controls (such as Bacillus thuringiensis var. israelensis) are effective tools against fungus gnat larvae because those larvae are exposed in the root zone. Shore flies, however, are not effectively controlled by insecticides — their pupal stage (the puparium) is thick-skinned enough that insecticides cannot penetrate it. If you're applying soil treatments for what you assume are fungus gnats but actually have shore flies, you won't see results — and you'll wonder what went wrong.
Quick identification checklist
When you spot a small fly near your plants, work through these questions in order:
1. Wing appearance. Are the wings clear and delicate with a faint Y-shaped vein? → Fungus gnat. Are the wings dark grey with five whitish spots? → Shore fly.
2. Body shape. Does the fly have long legs and long antennae, giving it a mosquito-like look? → Fungus gnat. Is the body stocky with short legs and short antennae, more like a fruit fly? → Shore fly.
3. Flight behavior. Does the fly scuttle along the soil surface or drift lazily toward the window? → Fungus gnat. Does it take off quickly and fly purposefully? → More consistent with shore fly.
4. Environment. Is there visible algae on the soil surface, benches, or nearby surfaces? → Shore fly is possible. No algae, just moist potting mix? → Fungus gnat is far more likely indoors.
5. Larval check. Press a potato slice into the soil. White larvae with a black head capsule? → Fungus gnats confirmed. No larvae found in root zone but tannish, headless larvae near algae-covered surfaces? → Shore fly.
Once you've confirmed which pest you have, treatment can be targeted accurately. For fungus gnats, see our dedicated guide on eliminating them. For shore flies, the priority is eliminating algae — the source they breed in — rather than applying insecticide, which won't reach the protected pupae.
- Use a magnifying glass or your phone's macro camera to check for the Y-shaped wing vein (fungus gnat) or the five white wing spots (shore fly) — these are the single most reliable adult ID features.
- The raw potato slice test is the most practical at-home method for confirming fungus gnat larvae in the root zone; check the underside after 24–48 hours.
- Shore flies are uncommon indoors unless there's algae present — on the soil surface, in a saucer, or on a humid windowsill. If you're seeing flies indoors with no obvious algae, fungus gnats are the much more likely culprit.
- If you've been treating for fungus gnats for several weeks with no improvement, re-examine the flies carefully — shore fly pupae cannot be penetrated by standard insecticides, so a mismatch between pest and treatment is a common reason controls seem to fail.
- Let the soil surface dry out between waterings; this disrupts the moist conditions that both pests prefer and is a safe first step regardless of which fly you're dealing with.
FAQ
How do I tell a fungus gnat from a shore fly with the naked eye?
The fastest adult-stage clue is the wings. Fungus gnats have long legs, a slender mosquito-like body, and clear wings with a subtle Y-shaped vein. Shore flies have a stocky, fruit-fly-like body with short legs and dark grey wings marked by five small whitish spots. Behavior also helps: fungus gnats are weak fliers that scuttle on the soil surface, while shore flies take off quickly when disturbed.
Are shore flies harmful to houseplants?
Shore flies are primarily a nuisance pest. Adults defecate on leaves, leaving black spots on foliage. In heavy infestations this can occasionally slow the growth of young cuttings. They don't feed on or damage roots the way fungus gnat larvae do, so the plant-health risk is much lower. That said, the cosmetic damage to leaves can be significant if populations are large.
Why won't my fungus gnat treatment work on shore flies?
Shore fly pupae have a thick outer casing (the puparium) that standard insecticides — including soil drenches — cannot penetrate. This means the treatments that reliably knock back fungus gnat larvae (such as Bacillus thuringiensis var. israelensis soil drenches) simply don't work against shore flies. If you've treated repeatedly with no result, re-examine whether you actually have shore flies rather than fungus gnats, and focus on eliminating algae instead.
How do I use a potato slice to check for fungus gnat larvae?
Cut a small cube or thin slice of raw potato and press it gently into the top layer of your potting mix. Leave it for one to two days, then carefully lift it and inspect the underside. Fungus gnat larvae — white, legless, with a shiny black head, up to about 1/4 inch long — are attracted to the potato and will collect there if they're present in the soil. This test targets root-zone feeders specifically, so it won't detect shore fly larvae, which live near algae on the soil surface rather than deeper in the root zone.
Can I have both fungus gnats and shore flies at the same time?
Yes, it's possible — both thrive in moist conditions — though shore flies are uncommon indoors unless algae is present somewhere nearby. If you're seeing two distinct fly types behaving differently (one scuttling near soil, one flying strongly), it's worth checking both. The potato slice test can confirm whether fungus gnat larvae are in the root zone, while checking for algae on the soil surface or in saucers can help you assess shore fly risk.





