BackgroundRelatively inexpensive, stable Schiff bases, namely 3-((4-hydroxybenzylidene)amino)-2-methylquinazolin-4(3H)-one (BZ3) and 3-((4-(dimethylamino)benzylidene)amino)-2-methylquinazolin-4(3H)-one (BZ4), were employed as highly efficient inhibitors of mild steel corrosion by corrosive acid.FindingsThe inhibition efficiencies were estimated based on weight loss method. Moreover, scanning electron microscopy was used to investigate the inhibition mechanism. The synthesized Schiff bases were characterized by Fourier transform infrared spectroscopy, nuclear magnetic resonance spectroscopy and micro-elemental analysis. The inhibition efficiency depends on three factors: the amount of nitrogen in the inhibitor, the inhibitor concentration and the inhibitor molecular weight.ConclusionsInhibition efficiencies of 96 and 92% were achieved with BZ4 and BZ3, respectively, at the maximum tested concentration. Density functional theory calculations of BZ3 and BZ4 were performed to compare the effects of hydroxyl and N,N-dimethylamino substituents on the inhibition efficiency, providing insight for designing new molecular structures that exhibit enhanced inhibition efficiencies.