Do your cloth diapers have ammonia smell? Have you washed them and stripped them and used bleach and RLR and GroVia Mighty Bubbles and OxiClean and extra rinses and washes to no avail? Do they still have a tiny hint of stink to them?
How do you get rid of ammonia smell in cloth diapers? I'll tell you the trick. Dilute it.
It comes down to science really. Let's think it through. Ammonia smell essentially comes from pee. Urine breaks down into ammonia over time which starts the stink. This is why using a diaper sprayer to spray out your diapers or rinsing out pee soaked overnight diapers can help with ammonia smell. Less urine in the fabric = less ammonia formation. Consequently, if your wash routine isn't cleaning everything out of the fabric, ammonia will build up over time creating that unmistakable smell and a horrible rash.
But chemically speaking, ammonia is a weak base which means it has a high pH (higher than water which is a neutral pH of 7). Detergent also has a high pH and if you used something like bleach trying to treat the problem, well, I hate to break it to you, but bleach has a high pH too. So, we need to bring that pH down by diluting it with water (a neutral pH) and/or a weak acid to bring back the balance.
Take those diapers that have residual stink, make sure you've washed them well with adequate detergent for the size of the load and then let them soak in water with some vinegar. Store bought white vinegar in the big jug is a weak acid that has a pH of about 6. Use the soak function on your washing machine or put them in a container or the bathtub and add a cup or two of vinegar and let them sit. Make sure your kids are supervised or use a secure area so you don't create a drowning hazard for curious children with open water.
The acid will help neutralize the base and bring things back into balance. After soaking, wash as usual and change your wash routine as needed going forward, maybe switch detergents too to prevent it from happening again.
NOTE, soaking like this is a last resort and not an every wash solution. Use at your own discretion. It may void your warranty and isn't the best for longterm longevity of fabrics or elastics. Elastics don't like to soak. But if you're having re-occurring ammonia issues, this trick might be just what you need. It works nicely for me and I hope it works well for you too.