your gas may smell like rotten eggs because of the sulfur in fiber-rich foods. sulfur is a natural compound that smells like spoiled eggs. many vegetables are sulfur-based. if this is causing your flatulence, simply modifying your diet could be enough to reduce it.