Electrically conducting polypyrrole (Ppy) coatings doped with sodium dodecylsulfate (SDS) have been deposited on 1Cr18Ni9Ti stainless steel by anodic polymerization from aqueous solutions of pyrrole and sodium dodecylsulfate. The corrosion behavior of Ppy coated steel was investigated in 0.3M HCl aqueous solution at room temperature by a combination of electrochemical measurement techniques and scanning electron microscopy. The steel is in active state at the open circuit potential and suffers from pitting corrosion when the polarization potential is higher than 210mV versus SCE. The Ppy coating can increase the corrosion potential of the steel by more than 600mV versus SCE, and the pitting corrosion potential by more than 500mV versus SCE. Fifty-day exposure experiments indicated that the Ppy coating shows high stability, and can inhibit effectively the corrosion of the steel.