We report on cyclic voltammetry and in situ electrochemical atomic force microscopy (EC-AFM) studies of localized corrosion of duplex 2205 stainless steel (DSS 2205) and austenitic stainless steel of the type AISI 316L in two model solutions, including artificial saliva (AS) and a simulated physiological solution known as – Hank's solution (PS). The AFM topography analysis illustrated the higher corrosion resistance of DSS 2205 steel for the chosen range of electrochemical potentials that were applied to the steel surface in both solutions. In contrast, pitting corrosion was observed at the surface of AISI 316L steel, with the pits becoming more evident, larger and deeper, when the sample was electrochemically treated in the PS. On both surfaces the growth of corrosion products formed during the oxidation process was observed. As a result, depending on the sample's metallurgical structure, different types of oxides covered the surface close to the breakdown potential. We distinguished between the square-like type of oxides on the surface of the DSS 2205, and the AISI 316L with its ellipse-like oxide deposits. The X-ray photoelectron spectroscopy (XPS) revealed the chemical composition of the deposition products, which consisted of two main elements, Fe and Cr. However, the oxides of the alloying elements Ni and Mo were negligible compared to the bulk.