What Are Tiny Flying Bugs in House Attracted to Light?

Those tiny flying bugs swarming your lamps and screens are almost certainly one of three common household pests: fungus gnats, drain flies, or non-biting midges. All three are strongly attracted to light, harmless to humans, and fixable once you identify where they’re breeding. The species you’re dealing with determines the fix, so telling them apart is the first step.

How to Identify What You’re Seeing

The three most likely culprits are all small (roughly 1/16 to 3/16 of an inch), all drawn to light sources, and all easy to confuse at a glance. But they look and behave differently up close.

  • Fungus gnats are the most common indoor species. They’re about 1/16 to 1/8 inch long with slender legs, long antennae, and light gray to clear wings. They look like tiny, delicate mosquitoes. You’ll typically notice them first near windows, hovering around houseplants or flying in weak, erratic patterns near lamps.
  • Drain flies are slightly larger (up to 3/16 inch) and look fuzzy or moth-like, with dense hair covering their bodies and wings. They’re dark to light gray or tan, sometimes with spots on their wings. They rest with their wings held flat, giving them a leaf-shaped silhouette. You’ll find them near sinks, showers, or floor drains.
  • Non-biting midges resemble mosquitoes more closely, measuring about 1/4 to 1/2 inch long with very long legs and proportionately long antennae. Males have feathery antennae. These are grayish-black with gray, opaque wings. Unlike the other two, midges breed outdoors in ponds, lakes, or stagnant water and enter your home through open doors and windows, drawn to lights at night.

None of these insects bite or transmit disease. The problem is nuisance, not danger.

Fungus Gnats: The Houseplant Problem

If you have indoor plants, fungus gnats are the most likely explanation. Adults lay eggs in moist potting soil, and the larvae feed on fungi, algae, and decaying organic matter in the top layer. At room temperature (around 75°F), eggs hatch in about 3 days, larvae develop over roughly 10 days, pupae emerge as adults 4 days later. That means a new generation appears every 17 days or so, which is why a small problem can explode quickly.

The adults are the ones you see flying toward your lights and windows. They’re weak fliers and mostly harmless, but their larvae can damage plant roots in large numbers. To confirm you have fungus gnats, press a small chunk of raw potato into the soil surface of a suspect plant. After a few days, pull it out. If you see small, white, legless larvae with shiny black heads clinging to it, you’ve found your source.

Getting Rid of Fungus Gnats

The key is targeting the larvae in the soil, not the adults in the air. Letting the top inch or two of soil dry out between waterings is the single most effective step, because the eggs and larvae need consistent moisture to survive. Beyond that, you have several options that work well together:

  • Sticky traps placed near plants catch adults and reduce the breeding population over a couple of weeks.
  • Soil drenches with Bti (a naturally occurring soil bacterium toxic to fly larvae but safe for plants, pets, and people) kill larvae directly. Mix it with water and pour it through the soil.
  • Beneficial nematodes (Steinernema feltiae) can be applied the same way and actively hunt larvae in the soil.
  • Potato chunks work as bait traps. Place them on the soil, wait a few days, then discard the infested pieces and replace with fresh ones.

For new plants, use only pasteurized potting mix. If you’re unsure about a bag of soil, you can solarize it yourself: moisten it, seal it in a clear or black plastic bag no more than 8 inches deep, and leave it in direct sun for 4 to 6 weeks. This kills eggs, larvae, and the microorganisms they feed on.

Drain Flies: The Plumbing Problem

If your tiny bugs cluster near bathrooms, kitchens, or utility sinks rather than plants, drain flies are the likely culprit. Their larvae develop inside drains, feeding on the slimy buildup of soap scum, algae, bacteria, and other organic sludge that coats the inside of pipes. They also breed in standing water under leaking pipes, in clogged gutters, or in garbage cans with residual water.

To test whether a specific drain is the source, place a strip of clear tape over the drain opening at night (leaving enough gap for air flow). Check it in the morning. If you find small, fuzzy flies stuck to the underside, that drain is producing them.

Getting Rid of Drain Flies

Killing the adults won’t solve anything because the organic film inside the drain keeps producing new ones. You need to physically remove or dissolve that buildup. Clean the drain thoroughly with a stiff brush or pipe brush, then follow up with a foaming drain cleaner designed to break down gelatinous scum deposits. For severe infestations, a high-pressure drain cleaning service can scour the entire length of the pipe.

Expect to maintain this cleaning routine for at least 3 weeks, because that’s how long it takes to break the full life cycle. If you stop too early, surviving larvae in the pipe will mature and restart the population.

Non-Biting Midges: The Outdoor Invader

If you live near a pond, lake, canal, or any body of stagnant, nutrient-rich water, the bugs at your lights may be non-biting midges. These insects breed outdoors in aquatic environments and are most active in spring and summer. During peak emergence periods, large swarms of males form near water and then drift toward residential areas, drawn especially to bright outdoor lights.

Unlike fungus gnats and drain flies, midges aren’t breeding inside your home. They’re entering through gaps around doors, windows, and any opening near an exterior light. The fix is about keeping them out rather than eliminating a breeding site you control.

Reducing Light Attraction at Entry Points

All three of these insects navigate toward light, particularly light in the ultraviolet and blue spectrum. Research on insect vision confirms that UV wavelengths between 365 and 395 nanometers are the most attractive to gnats, drain flies, and similar small fliers. Standard cool-white LEDs and older fluorescent bulbs emit plenty of light in this range.

Switching your porch lights and exterior fixtures to warm white or ultra warm white LEDs (rated below 3,600 Kelvin) significantly reduces the number of insects congregating near your doors and windows at night. These bulbs emit wavelengths above 550 nanometers, which most flying insects struggle to detect. Yellow-coated “bug light” bulbs, with peak wavelengths of 550 to 600 nanometers, are specifically designed for this purpose and work well.

Inside the house, if you’re dealing with an active infestation, a small UV light trap can help reduce adult populations while you address the breeding source. Adhesive-style traps (which use a UV light to attract insects onto a sticky board) work silently and are safe for kitchens, bedrooms, and anywhere you’d rather not hear a zapping sound. The glue boards typically need replacing every 2 to 4 weeks depending on how many bugs you’re catching. Electric grid zappers cover larger areas but are better suited to garages or utility rooms.

The Apple Cider Vinegar Trap

For a quick DIY option, fill a small jar with about 1/4 cup of apple cider vinegar and add a few drops of liquid dish soap. The vinegar’s sweet, fermented smell draws in gnats and small flies. Normally they could land on the liquid surface and fly away, but the dish soap breaks the surface tension, so their wings get wet and they sink. This works best for fungus gnats and fruit flies. Drain flies and midges are less reliably attracted to vinegar, so it’s a useful diagnostic tool: if the trap fills up, you’re likely dealing with fungus gnats or fruit flies rather than drain flies.

Place traps near the areas where you see the most activity. They won’t solve the problem on their own, since new adults keep emerging from the breeding site, but they reduce the visible population while your other control methods take effect.

Preventing Reinfestation

Once you’ve cleared an infestation, a few habits keep it from returning. Water houseplants only when the top layer of soil is dry to the touch. Inspect new plants and bags of potting soil before bringing them inside. Run water through infrequently used drains at least once a week to prevent organic buildup. And if you live near standing water, keep window screens in good repair and use warm-spectrum bulbs on your porch. Most people find that addressing the moisture source, whether it’s overwatered soil or a gunky drain, is enough to stop seeing the bugs within two to three weeks.