Gnats are repelled by strong-smelling essential oils, especially peppermint, citronella, eucalyptus, tea tree, lavender, lemongrass, and lemon. Among the active compounds in these oils, geraniol (found in lemongrass and citronella) stands out as the most effective, repelling up to 97% of flying insects when diffused indoors.
The Most Effective Oils and Why They Work
Gnats rely heavily on their sense of smell to find food, moisture, and breeding sites. Essential oils overwhelm those receptors. Research on fruit flies (close relatives of common gnats) shows that volatile compounds in plant oils activate multiple odor receptors simultaneously, essentially jamming the insect’s ability to navigate. For some oils like peppermint, repellency works through both the standard smell receptors and additional sensory pathways, making it harder for gnats to adapt.
Here are the oils with the strongest track records:
- Peppermint oil: The menthol in peppermint triggers multiple repellency pathways in small flies, not just smell-based ones. This dual mechanism makes it one of the more reliable options.
- Citronella oil: A classic insect repellent, though its strength varies dramatically by delivery method. Citronella candles only reduced insect activity by about 14% in controlled tests, while citronella diffusers reached 68%.
- Lemongrass oil: Contains geraniol, the compound that performed best in head-to-head testing. Geraniol diffusers repelled 97% of insects indoors and 75% outdoors at a distance of about 20 feet. Lemongrass also works as a broad-spectrum repellent against multiple insect types.
- Eucalyptus oil: Its intense camphor-like scent is a strong gnat deterrent, particularly useful in enclosed spaces like kitchens and bathrooms.
- Tea tree oil: Beyond repelling gnats, tea tree oil can suffocate larvae on contact, making it useful for treating the soil of houseplants infested with fungus gnats.
- Lavender oil: Effective as a repellent and pleasant enough for bedroom or living room use. Works best in a diffuser or diluted in a spray.
- Lemon oil: Its clean citrus scent doubles as a natural cleaning agent, which helps because gnats are drawn to organic residue on surfaces.
Diffusers vs. Candles: Delivery Matters
How you disperse the oil matters almost as much as which oil you choose. In a study comparing candles to electric diffusers using the same active compounds, the difference was striking. Citronella candles repelled only 14% of mosquitoes indoors, while citronella diffusers hit 68%. Geraniol candles managed 50%, but geraniol diffusers reached 97%. The likely reason: diffusers release a steadier, more concentrated stream of volatile compounds into the air, while candles burn off much of the oil before it can spread.
For gnats in your home, an ultrasonic or reed diffuser placed near the problem area will outperform a scented candle every time. If you’re dealing with gnats outdoors on a patio, keep your expectations realistic. Even the best-performing compound, geraniol, dropped to 75% repellency outdoors, and citronella fell to just 22%. Wind and open air dilute the effect quickly.
How to Make a Gnat Repellent Spray
A simple spray bottle works well for targeting specific areas like kitchen counters, window frames, or the soil surface of houseplants. The standard ratio is 20 drops of essential oil per liter of water (roughly a quart). You can use a single oil or combine two or three.
Oil and water don’t mix easily, so shake the bottle vigorously before each use. If the oil keeps floating to the top, add a small amount of natural emulsifier like liquid castile soap or soapberry powder to help it blend. A teaspoon of dish soap per liter also works and has the added benefit of trapping gnats on contact.
For Fungus Gnats in Houseplants
Fungus gnats breed in the moist soil of potted plants, so surface spraying alone won’t solve the problem. Mix 20 drops of tea tree oil or lavender oil into a liter of water and use it to water the affected plants directly. This targets the larvae living in the top layer of soil. Repeat every few days for two to three weeks, since fungus gnat eggs hatch on a rolling cycle. Between waterings, let the top inch of soil dry out completely. Fungus gnat larvae can’t survive in dry soil, so reducing moisture is just as important as the oil treatment.
Pet Safety Concerns
Most of the essential oils that repel gnats are toxic to cats. This includes tea tree, eucalyptus, peppermint, citronella, lemongrass, lavender, and citrus oils. Cats lack the liver enzymes needed to break down certain compounds in these oils, and exposure through diffusers, skin contact, or ingestion can cause drooling, breathing difficulty, vomiting, and potentially liver damage.
Dogs are generally less sensitive than cats but can still react to concentrated oils, particularly tea tree and eucalyptus. Skin irritation, stomach upset, and respiratory symptoms are the main warning signs. If you have pets, avoid diffusing these oils in enclosed rooms where your animals spend time. Topical sprays applied to plant soil are lower risk since the concentration is small, but keep treated plants out of reach of curious pets who might dig in or chew on leaves.
Getting the Best Results
Essential oils are repellents, not pesticides. They drive gnats away from a treated area but won’t eliminate an established infestation on their own. For the best results, combine oils with source control: empty standing water, clean drains where organic film builds up, store fruit in the refrigerator, and take out compost scraps frequently. A shallow dish of apple cider vinegar with a few drops of dish soap near your problem area will trap gnats that the oils push out of hiding.
Reapply sprays every two to three days, since the volatile compounds evaporate and lose potency within 48 hours. Diffusers provide more consistent coverage but need regular refilling. If you’re choosing just one oil to start with, lemongrass gives you the strongest active compound (geraniol) at a relatively low cost, with the added advantage of repelling a broad range of flying insects beyond gnats.

