Barbituric acid (BA), 5,5-dietylbarbituric acid sodium salt (DEBA) and thiobarbituric acid (TBA) were investigated as corrosion inhibitors for mild steel in 1 M H3PO4 solution at 25 +/- 1 degrees C using AC impedance spectroscopy, linear polarization resistance (LPR) measurement and polarization curves measurement techniques. AC impedance results were interpreted using an equivalent circuit in which a constant phase element (CPE) was used in place of a double layer capacitance (C-dl) in order to give more accurate fit to the experimental results. The experimental results showed that these compounds inhibit the corrosion to some extent, TBA being the most efficient and BA the least. Therefore, a detailed study was carried out for TBA in the absence and in the presence of iodide ions. The inhibition efficiency increased with TBA concentration both in the absence and in the presence of iodide ions. Adsorption of TBA molecules on mild steel surface was found to obey the Langmuir adsorption isotherm in both case with standard free energies of adsorption (Delta G(ads)degrees)-20.1 kJ/mol and -21.6 kJ/mol, respectively. In order to explain why TBA is the most efficient inhibitor and BA is the least ab initio quantum chemical calculations were applied. The relations between quantum chemical parameters and corrosion inhibition efficiency have been discussed to see if there is any correlation between the two of them. (C) 2008 Elsevier B.V. All rights reserved.