A flying bug with a long tail inside your home is most likely one of a handful of common insects, and nearly all of them are harmless. The “tail” you’re seeing is usually not a stinger. Depending on the insect’s size, shape, and behavior, it could be a crane fly, an ichneumon wasp, an ensign wasp, a mayfly, or a scorpionfly. Here’s how to tell them apart and whether you need to worry.
Crane Flies: The Most Common Culprit
If the bug looks like an oversized mosquito with long, dangly legs and a pointed tip at the end of its body, it’s almost certainly a crane fly. These are one of the most frequently spotted “long-tailed” flying insects indoors, especially near windows and porch lights. The pointed end on a female crane fly is her ovipositor, a structure she uses to lay eggs in soil. Males have a blunter abdomen.
Crane flies do not bite, sting, or cause any damage to your home, food, or belongings. They’re completely harmless despite their mosquito-like appearance. They wander inside because they’re attracted to light, and they’re clumsy fliers that bump into walls and ceilings. You can simply catch one in a cup and release it outside, or ignore it entirely.
Ichneumon Wasps: Long Tail, No Venom
If the flying insect is wasp-shaped and has a thread-like tail that seems impossibly long, sometimes longer than the body itself, you’re likely looking at an ichneumon wasp. The giant ichneumon wasp (genus Megarhyssa) is the most dramatic example: the body is about 1.5 inches long, and the trailing ovipositor adds another 2 to 3 inches, bringing the total length to roughly 4 inches. That tail is not a stinger. It’s a flexible, hair-thin egg-laying tube the female uses to drill through tree bark and deposit eggs on wood-boring larvae hidden inside.
These wasps look alarming, but ichneumon wasps with long ovipositors cannot sting humans at all. Species with shorter ovipositors can technically pierce skin if grabbed or squeezed, but they inject no venom. The result would be nothing more than a minor poke. They ignore people when possible and have no interest in your home. One that ends up inside simply got lost.
Ensign Wasps: Small, Bouncing, and Beneficial
Ensign wasps are a different story, not because they’re dangerous, but because finding one indoors might tell you something useful. These small, dark insects are only 5 to 7 millimeters long, with a distinctive flag-shaped abdomen attached to the body by a thin stalk. They bob that abdomen up and down constantly as they walk, which makes them look like they’re waving a tiny signal flag. That bouncing motion is often what catches people’s attention.
Ensign wasps do not sting or bite. They are parasites of cockroach eggs. A female ensign wasp locates a cockroach egg case, carefully inserts her ovipositor into it, and lays a single egg inside. Her larva then feeds on the dozen or more cockroach eggs in the case, destroying them all. No cockroaches hatch from a parasitized egg case. So if you’re seeing ensign wasps indoors, it likely means cockroach egg cases are somewhere nearby. The wasps themselves are doing you a favor.
Mayflies: Fragile Bugs With Thread-Like Tails
Mayflies are soft, delicate insects with two or three extremely long, thread-like filaments trailing from the tip of the abdomen. These tails (called cerci) are often longer than the body itself, giving the insect an unmistakable silhouette. Their bodies range from 4 to 35 millimeters, and they hold their wings upright above their back when resting, like a tiny sail. Their eyes are large, their antennae are very short, and their legs are slender.
Adult mayflies are attracted to light, which is how they end up indoors. They live near water and are most common in homes close to lakes, rivers, or streams, particularly during mass emergence events in late spring and summer. Adults don’t eat at all. Their mouthparts are nonfunctional. They live just long enough to mate and die, often within a day or two. They’re completely harmless and will not survive long inside your home.
Scorpionflies: Curled Tail, No Sting
If the insect has a yellowish body with dark wing patches, a long beak-like face, and a tail that curls upward like a scorpion’s, it’s a scorpionfly. The curled tail belongs only to males and looks menacing, but it’s not a stinger. Those are mating claspers, used to grip the female during reproduction. Scorpionflies cannot sting or bite people.
These insects prefer shady, damp areas and feed mostly on dead insects and decaying organic matter. They occasionally fly indoors through open windows. They’re uncommon house visitors compared to crane flies or mayflies, but their scorpion-like posture tends to alarm people more than most other insects their size.
How to Tell Them Apart Quickly
- Looks like a giant mosquito with a pointed tip: crane fly. Harmless.
- Wasp-shaped with an extremely long, hair-thin trailing tail: ichneumon wasp. Cannot sting you with that tail.
- Tiny, dark, bobbing its abdomen up and down: ensign wasp. Beneficial cockroach egg destroyer.
- Soft, fragile body with two or three thread-like tails longer than the body: mayfly. Attracted to your lights, will die within a day or two.
- Yellow-bodied with a curled, scorpion-like tail tip: scorpionfly. The tail is for mating, not stinging.
Should You Remove Them?
None of these insects pose a threat to you, your pets, or your home. A cup and a piece of paper is all you need to catch and release any of them. Turning off porch lights or switching to yellow-toned bulbs will reduce the number of light-attracted species like crane flies and mayflies that wander inside. Sealing gaps around windows and doors helps too.
The one case where the bug’s presence matters is the ensign wasp. If you’re seeing them regularly, it’s worth checking for cockroach activity, since the wasps are there specifically because cockroach egg cases are available. The wasps are your allies in that situation, so there’s no reason to kill them.