Gnats are repelled by strong-scented essential oils, especially peppermint, citronella, eucalyptus, and lemongrass. These oils work because the chemical compounds in them overwhelm gnats’ sensitive smell receptors, triggering avoidance behavior. The good news is you can put several of these scents to work around your home with simple sprays or diffusers.
The Most Effective Scents Against Gnats
Peppermint is one of the strongest gnat deterrents. The menthol in peppermint oil is intensely irritating to small flies, and once gnats detect it, they avoid the area entirely. Eucalyptus works through a similar mechanism, producing a sharp, penetrating scent that gnats find intolerable.
Citronella is probably the most widely recognized natural insect repellent. It’s one of only three plant-based active ingredients registered with the EPA for use in skin-applied repellent products, alongside oil of lemon eucalyptus and catnip oil. That EPA registration means these ingredients have met a formal standard for safety and effectiveness, not just anecdotal support.
Lemongrass, which contains many of the same compounds as citronella, doubles as a broad-spectrum insect deterrent. Lavender rounds out the list with a scent that humans tend to enjoy but gnats avoid. Lemon oil and tea tree oil are also commonly used, though tea tree works partly by direct contact rather than scent alone.
Why Geraniol Outperforms Citronella
If you want the single most effective plant-based compound, geraniol is worth knowing about. Found naturally in geraniums, roses, and lemongrass, geraniol significantly outperformed both citronella and linalool (the main compound in lavender) in controlled repellency tests. Outdoors, geraniol diffusers repelled 75% of insects at a distance of six meters, compared to 58% for linalool and just 22% for citronella. Indoors, geraniol diffusers hit 97% repellency.
The format matters too. In those same tests, continuous-release diffusers were far more effective than scented candles. A geraniol candle only achieved about 50% repellency indoors, while the diffuser nearly eliminated the problem. So if you’re choosing between a citronella candle on the patio and a geraniol diffuser, the diffuser wins on both compound and delivery method.
How These Scents Work on Gnats
Gnats and other small flies navigate the world primarily through smell. Their antennae are covered in specialized receptor neurons, each tuned to detect specific types of molecules. When a gnat encounters certain compounds, those receptors trigger hardwired avoidance circuits in the brain that override any attraction the gnat might feel toward food or moisture nearby.
Citronellal, the active compound in citronella oil, activates specific sensory neurons in the antenna and also stimulates a temperature-sensitive channel in nerve cells. This dual activation essentially creates an alarm signal the gnat can’t ignore. Other repellent compounds work by mimicking or interfering with the carbon dioxide detection system that gnats use to locate people and food sources, effectively jamming their navigation.
Some scents go further than just repelling. Certain aversive pathways in small flies are so powerful that activating them overrides attractive signals entirely. This is why a strong peppermint or eucalyptus scent near a fruit bowl can keep gnats away even though the fruit itself is a powerful attractant.
How to Make a Gnat-Repelling Spray
A simple and effective recipe from the University of Hawaii’s College of Tropical Agriculture: combine 2 tablespoons of liquid soap, 2 teaspoons of peppermint oil, and 1 gallon of warm water. The soap helps the oil mix evenly into the water and also helps the spray cling to surfaces. You can spray this around doorways, windows, kitchen counters, and near houseplants where fungus gnats tend to gather.
For smaller batches, scale it down to roughly 10 to 15 drops of essential oil per cup of water with a few drops of dish soap. You can swap peppermint for eucalyptus, lemongrass, or a combination. Spraying directly onto soil surfaces of houseplants can help deter fungus gnats specifically. Neem oil is particularly effective against fungus gnats if that’s the species you’re dealing with.
How Long the Scent Lasts
The biggest limitation of essential oil repellents is duration. Unlike synthetic repellents that can last many hours, most plant-based oils evaporate relatively quickly. In laboratory testing, a 10% essential oil emulsion provided complete protection from bites for longer than one hour, with clove and cinnamon oils lasting the longest. But efficacy varies dramatically depending on the oil, its concentration, and how it’s applied.
For home use, this means you’ll need to reapply sprays every couple of hours or use a continuous diffuser for sustained protection. Reed diffusers, electric diffusers, or cotton balls soaked in oil and placed in problem areas can maintain a scent barrier longer than a single spray application. Refreshing cotton balls daily keeps the scent strong enough to be effective.
Safety Around Pets
Several of the most effective gnat-repelling oils are toxic to cats, dogs, and birds. Tea tree oil is the most commonly reported cause of essential oil poisoning in pets. It can damage the liver, and even diffusing it in a room with cats poses a risk. Eucalyptus and cedar oils can cause seizures in animals. Cats are especially vulnerable because they lack a liver enzyme needed to break down many essential oil compounds. Birds are also at high risk because their respiratory systems are extremely sensitive to airborne particles and fragrances.
Signs of essential oil toxicity in pets include vomiting, drooling, lethargy, loss of coordination, and loss of appetite. More serious exposure can lead to tremors, difficulty breathing, or seizures. If you have cats, dogs, or birds, stick to oils with better safety profiles like lemongrass or lavender, use them in well-ventilated rooms the animals don’t frequent, and avoid diffusing oils continuously in enclosed spaces. Spraying diluted solutions on surfaces the pet won’t lick is generally safer than filling a room with aerosolized oil.
Other Scents and Strategies That Help
Beyond essential oils, a few common household items produce scents gnats dislike. Apple cider vinegar, ironically, attracts gnats rather than repelling them, which makes it useful as a trap ingredient but not as a deterrent. Vanilla extract diluted in water has some anecdotal support as a skin-applied repellent for outdoor use, though it lacks the research backing of the oils listed above.
Combining scent-based repellents with source control is the most effective strategy. Gnats breed in moist organic material: overwatered houseplant soil, rotting fruit, damp drains, and compost bins. Eliminating these breeding sites while using scent barriers at entry points gives you both immediate relief and long-term prevention. A peppermint spray near the kitchen window will keep gnats from coming in, but if there’s a forgotten banana turning brown on the counter, you’re fighting a losing battle.

