Two imines of different molecular sizes namely 3-(phenylimino) indolin-2-one (PII) and 3,3- (1,4-phenylenebis (azan-1-yl-1-ylidene) diindolin-2-one (PDI) were investigated for their corrosion inhibition on mild steel in 1 M HCl solution using electrochemical impedance spectroscopy (EIS). The bigger molecule PDI containing double the amount of isatin moiety exhibited higher inhibition efficiency of 87.3% while PII that contained monoisatin moiety showed a lower inhibition efficiency of 74.8%. Both compounds had an increase in inhibition efficiencies percentage as concentrations increased. Density functional theory (DFT) was used to determine the correlation between the corrosion inhibition efficiency and electronic parameters. The DFT calculations indicated that the corrosion inhibition efficiency was mainly dependant on the frontier orbital energy gap and the chemical softness/hardness of the imines.