The cause of a rotten egg taste in the mouth is hydrogen sulfide. The rotten egg taste is similar to the smell of sulfur. Humans get this taste when they eat foods that are high in sulfur.
Usually, the rotten egg taste comes out when a person burps or belches. This taste results after sulfur-reducing microbes in the stomach or small intestine break down the sulfur-containing proteins found in certain foods. The best way to avoid rotten egg taste is to avoid these foods, which include dried, canned and preserved foods, eggs, dairy products, red meat and several vegetables. Additional foods to avoid include some fruits, whey proteins, tea and coffee.