Polyaniline (PAn) films were electrodeposited on stainless steel 304 (SS) from 0.5M H2SO4 solution containing 0.1M aniline (An) by using potentiodynamic and potentiostatic techniques. In particular, PAn films were prepared as follows: (i) by cyclic potential sweep (CPS) deposition upon varying the upper potential limit (E l) of the polymerization potential region between 0.8 and 1.1V, while the lower potential limit was equal to −0.2V; (ii) by potentiostatic deposition upon varying the applied potential (E appl) between 0.8 and 1.1V. The potential sweep rate (dE/dt) was also varied for the An polymerization during the CPS deposition. Variation of the E l, dE/dt and E appl affects the PAn growth leading to films of different electrochemical and structural properties. The electrochemical properties of the PAn were examined by using cyclic voltammetry. Scanning electron microscopy was used to reveal the structure and morphology of the PAn films. Monitoring the open circuit potential (E OC) of the PAn-coated SS electrode in 0.5M H2SO4 shows that the SS remains in the passive state. PAn films can also provide protection to SS in chloride-containing 0.5M H2SO4 for the studied period of time, although pits were detected during prolonged immersion. The protection efficiency seems to be related with the parameters E l, dE/dt and E appl varied during polymerization. The mechanism of the SS protection provided by the PAn coatings is discussed in terms of the active role of PAn in corrosive environments.