An attempt was made to study the surface force behaviour and topography of 316L (0.015, 0.198 and 0.556% N) stainless steels (SS) under different surface conditions (as-polished, passivated in 0.5 M NaCl (ex situ and in situ)), using an electrochemical atomic force microscopy (ECAFM) operating in air and liquid environments. Force–distance (F–D) curves were established and analysed for the slope values to understand the surface properties. The slope values are directly proportional to the stiffness and elastic modulus of the surface layer being studied. The results indicated that the slope of the F–D curves was decreasing as the conditions of testing were changed from air to liquid environment of AFM, as-polished to passivated (ex situ), and then from passivated (ex situ) to passivated (in situ). Also, the passive films prepared under different electrode potential conditions and nitrogen content in the alloy showed significant variations in their stiffness. In general, the passive films are found to be softer surfaces with a gel-like meshy structure, and this was verified by topographic observation of the specimens. This work supports the use of ECAFM for the study of surface properties of passive films.