Corrosion inhibitors significantly retard the rate of attack of a corrosive medium on a metal or an alloy when they are added in small concentrations. Their effect on human health and the environment is a very important criterion to be considered when dealing with corrosion inhibitors. Plants are non-toxic, environment-friendly and rich reserves of naturally occurring organic compounds which can aid the corrosion inhibition process. The inhibition effect of Ficus racemosa (FR) leaf extract on the corrosion of mild steel in 0·5 M sulfuric acid solution was investigated by potentiodynamic polarisation and electrochemical impedance spectroscopy. The inhibition efficiency increases with an increase in the concentration of the FR leaf extract, attaining the maximum value at the highest inhibitor concentration of 2500 parts per million. The effect of temperature on the corrosion behaviour of mild steel in 0·5 M sulfuric acid with and without addition of leaf extract was studied in the temperature range of 298–328 K. A decrease in inhibition efficiency was observed with the rise in temperature. Potentiodynamic polarisation data revealed a mixed mode of inhibition. The adsorption process was found to be consistent with Langmuir adsorption isotherm.