Hydrogen sulfide ( hydrogen sulphide in British English ) , H2S , is a colorless , toxic , flammable gas that is responsible for the foul smell of rotten eggs and flatulence . Hydrogen sulfide ( British English : hydrogen sulphide ) is the chemical compound with the formula H2S . It is a colorless , very poisonous , flammable gas with the characteristic foul odor of rotten eggs at concentrations up to 100 parts per million .