Abstract
This study investigates the corrosion inhibition performance of three ionic liquids, 1-butyl-3-methylimidazolium acetate (Inh A), 1-butyl-3-methylimidazolium hexafluorophosphate (Inh B), and 1-butyl-3-methylimidazolium tetrafluoroborate (Inh C), on carbon steel in 1.0 M HCl. The investigation employed weight loss measurements and electrochemical techniques to evaluate corrosion rates and inhibition efficiency. (1)H-NMR and elemental analysis confirmed the chemical structures of the ionic liquids. Surface studies, including energy-dispersive X-ray spectroscopy (EDX) and scanning electron microscopy (SEM), verified the adsorption of these inhibitors on the C-steel surface. Results demonstrated that all ionic liquids effectively reduced corrosion rates, with Inh A achieving the highest inhibition efficiency of 96.79% at 60 °C. Elevated temperatures increased the protective capabilities of the ionic liquids. This comprehensive approach establishes the efficacy of these ionic liquids as effective corrosion inhibitors in acidic environments and provides insights into their structural characteristics and adsorption mechanisms. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1038/s41598-026-42153-3.