The electrochemical synthesis of polyaniline (PANI) was achieved on stainless steel (316L) electrodes using cyclic voltammetry technique in monomer containing oxalic acid solution. Homogenous and strongly adherent films with different thickness were obtained by applying two different potential ranges for the synthesis. The corrosion performances of these coatings were investigated by AC impedance spectroscopy. It was seen that polyaniline films provided better protection for long exposure times in 0.1 M HCl solution. The polymer films exhibited significant barrier property against the attack of corrosive agents. It was found that 0.25-1.00 V was a more suitable potential range compared with -0.20 to 1.65 V to obtain good protective coatings. (C) 2004 Elsevier B.V. All rights reserved.