Yes, ammonia will kill maggots. The fumes and chemical contact are toxic to fly larvae, disrupting their cellular functions and killing them within minutes of direct exposure. Household ammonia, the kind sold in cleaning aisles, is strong enough to do the job when applied directly or as a diluted solution.
That said, ammonia isn’t the only option, and it comes with real safety concerns. Here’s what you need to know before reaching for the bottle.
How Ammonia Kills Maggots
Ammonia is toxic to soft-bodied organisms because it passes freely through cell membranes. Once inside cells, it disrupts ion balance, interferes with energy production in mitochondria, and triggers a flood of reactive oxygen species, molecules that damage proteins, lipids, and DNA. For maggots, which breathe through their skin and have no protective shell, this exposure is quickly fatal. The fumes alone can be lethal to larvae in an enclosed space like a trash bin.
How to Use It on a Trash Can
The most common scenario is a garbage bin crawling with maggots. Here’s a straightforward approach:
- Empty the bin completely and take it to an open, outdoor area.
- Pour or spray ammonia directly onto the maggots and the interior surfaces where they’re clustered.
- Let it sit for several minutes so the chemical has time to work.
- Rinse thoroughly with water, then scrub the inside with hot, soapy water.
That final scrub matters more than you might think. Maggots come from fly eggs, and if you kill the larvae but leave behind residue, grease, or food film, flies will lay new eggs within days. A clean, dry bin is the real long-term fix.
Dilution for Garden or Outdoor Use
If you’re dealing with maggots in soil, compost, or around fruit trees, a diluted solution is more appropriate than pouring ammonia straight from the bottle. One practical recipe: mix 2 teaspoons of household ammonia per liter of water, adding a small amount of liquid soap to help the solution stick to surfaces. Make a fresh batch each week if the problem persists.
Be cautious with concentration, though. Ammonia is toxic to plants and seedlings, not just maggots. Research in agronomy has shown that ammonia creates toxicity zones in soil extending 1 to 5 centimeters from the source. Within three days of exposure, plant roots can stop growing, develop tissue death starting at the tips, and shrivel. Tap-rooted plants like canola are especially vulnerable, sometimes dying outright. If you’re pouring ammonia near plants you want to keep, stick to the diluted recipe and avoid repeat applications in the same spot.
Safety Precautions
Ammonia fumes are no joke. The same properties that make it lethal to maggots can irritate your eyes, nose, throat, and lungs. Always work outdoors or in a very well-ventilated space. If you’re pouring it into an enclosed bin, stand upwind and avoid leaning directly over the opening.
The single most important rule: never mix ammonia with bleach. This combination produces chloramine gas, which causes serious respiratory damage and can be fatal in enclosed spaces. If you’ve already cleaned your trash can with bleach, rinse it completely before using ammonia, or just pick one product and stick with it.
Gloves are a good idea since ammonia can irritate skin on contact, particularly with prolonged exposure. If you’re sensitive to fumes or working in a partially enclosed area, a respirator offers far more protection than simply holding your breath.
How Ammonia Compares to Other Methods
Ammonia works, but it’s not the fastest or simplest option. Boiling water kills maggots on contact, requires no chemicals, and poses no fume risk. For a trash can full of larvae, a kettle of boiling water is often the most practical first step. You can follow up with ammonia or another cleaner to sanitize the surfaces.
Vinegar also kills maggots, though it works through acidity rather than cellular toxicity. It’s slower-acting and less reliably lethal than ammonia, but it’s safer to handle and won’t damage most surfaces. For compost piles specifically, extension services generally recommend against adding vinegar or ammonia because both disrupt the microbial balance that makes composting work. A better approach for compost is to turn the pile, add water and nitrogen-rich material, and let the internal temperature rise. Temperatures in an active compost pile will kill larvae and pupae without chemicals.
Salt and diatomaceous earth are also commonly mentioned. Salt dehydrates maggots over a period of hours. Diatomaceous earth works similarly by abrading the larvae’s outer layer and drawing out moisture. Neither is as fast as ammonia or boiling water, but both are non-toxic to humans and pets.
Preventing Maggots From Coming Back
Killing existing maggots solves today’s problem. Preventing new ones means cutting off what attracts flies in the first place. Maggots appear because flies laid eggs on something organic, usually rotting meat, dairy, or wet food waste. The eggs hatch in 8 to 20 hours in warm weather, so infestations can seem to appear overnight.
Double-bag any meat scraps or fish before tossing them. Rinse food containers before they go in the bin. Keep trash can lids tightly closed. In hot months, take garbage out more frequently rather than letting it sit. If your outdoor bin gets direct sun, the interior temperature accelerates decomposition and makes it more attractive to flies. Moving it to a shaded spot can help.
A light spritz of ammonia solution on the inside walls of a clean, empty bin once a week acts as a deterrent. Flies dislike the smell and are less likely to land and lay eggs on treated surfaces.

