Benzazoles of the general formula ##STR1## and derivatives thereof; where X=O, S, NH and n is a number, for example 3-12 or greater, such as 3-5 or greater, and R is a substituted group, for example, a hydrocarbon or substituted hydrocarbon group, such as alkyl, etc. and n' is a number 0-3 or greater; and to use for such benzazoles as corrosion inhibitors.