A novel anil compounds, 1-{(Z)-[(3,5dimethylphenyl)imino]methyl}naphthalen-2-ol (HNMA) and 5- (diethylamino) -2- {(Z)- [(3,5-dimethylphenyl)imino] methyl} phenol (DMSMA), were prepared and characterized on the basis of elemental analyses, X-ray, 1H NMR, 13C NMR, UV–Vis and IR spectral data. Their inhibiting performance for mild steel in 0.5 M H2SO4solution was evaluated by a series of techniques including potentiodynamic polarizationelectrochemical impedance spectroscopy, scanning electronic microscope (SEM), energy-dispersive X-ray spectroscopy (EDX) and theoretical calculations. Findings show that HNMA and DMSMA act as good inhibitors, and their inhibition efficiency increases with increasing their concentration. Polarization data suggested that the Schiff bases molecules used as mixed type inhibitors. Impedance measurements indicating that the corrosion reaction is controlled by charge transfer process. The adsorption of HNMA and DMSMA on the metal surface was found to obey Langmuir adsorption isotherm. Furthermore, theoretical study gives insightful explanations of the inhibition mechanism.