Explanation
The gas that smells like rotten eggs is hydrogen sulfide (H2S). Hydrogen sulfide is a colorless, flammable gas that has a distinctive odor resembling that of rotten eggs or sulfur. It is produced naturally by the decay of organic matter containing sulfur, such as in swamps, sewers, and volcanic areas. Hydrogen sulfide can be toxic at high concentrations, and even at lower levels, its odor is often a warning sign of potentially hazardous conditions.