An eco-friendly silane sol–gel coating incorporating nanoclay was formulated to provide an effective corrosion protection for stainless steel 304L in a NaCl solution.