The objective of the present study was to introduce a cost‐effective and environmentally friendly coating to improve the corrosion resistance of the structures located in salt water. The coating solution, based on amorphous aluminum phosphate composition, was synthesized by sol–gel process and applied to AISI 304 stainless steel by dip coating technique. X‐ray diffraction, scanning electron microscopy, and energy dispersive X‐ray spectroscopy analyses were employed to investigate the phase composition and morphology of the coating. Corrosion behavior of the uncoated and coated samples was investigated using standard salt spray test, potentiodynamic polarization, and electrochemical impedance spectroscopy (EIS) in 3.5 wt.% NaCl solution. Salt spray test results for the bare substrate revealed a corrosion rate of six‐time greater than that of the coated surface after 168 hr exposure time. Electrochemical test results declared that the amorphous AlPO4 coating decreased the corrosion current density of the AISI 304 stainless steel by 10 orders of magnitude. Furthermore, according to the corresponding EIS measurements, the coated surface exhibited a superior anti‐corrosion performance than uncoated sample. Overall, the results declared that the amorphous AlPO4 coating could be a good choice for surface protection of stainless steel against electrochemical corrosion in salty environments.