A surface treated steel sheet with less environmental impact for electronic components excellent in solder wettability, a rust-proof property and a whisker-proof property and having an Sn—Zn alloy layer which is formed by plating Sn and Zn on a steel sheet or a Ni plated steel sheet and then applying thermal diffusion treatment, or by plating Sn—Zn alloy on a steel sheet or a Ni plated steel sheet, characterized in that the amount of said Sn—Zn alloy layer is not less than 3 g/m2, the Zn/Sn ratio (in weight ratio) is 0.01 to 10 and an inorganic film mainly composed of magnesium phosphate is formed in the amount of 1 to 100 mg/m2 in terms of the amount of P+Mg on said Sn—Zn alloy layer.