In this work, electrochemical tests were performed to measure hydrogen permeation during free dissolution of carbon steel in the presence of the ionic liquids (ILs) 1-ethyl-3-methylimidazolium acetate [(EMIM) + (Ac) -], 1-ethyl-3-methylimidazolium bromide [(EMIM) + (Br) -], and 1-butyl-3-methylimidazolium tetrafluoroborate [(BMIM) + (BF 4 ) -] in 5.4 mol L -1 HCl aqueous solution. The permeation inhibition efficiencies (IEp (%)) of 5-hydroxy-2-nitromethylene-hexahydropyrimidine (HPY) and a commercial corrosion inhibitor (CCI) were also evaluated. Among the ILs, the (BMIM) + (BF 4 )compound presented the highest corrosion and hydrogen permeation inhibition efficiencies, with values of 23% and 30%, respectively. The (EMIM) + (Br)and (EMIM) + (Ac)compounds were not effective against corrosion, but they presented IEp of 15.8% and 23%, respectively. The HPY compound demonstrated 61% effectiveness in preventing corrosion, while in silico evaluation indicated no toxicity. However, neither the HPY compound nor the CCI compound inhibited the entry of hydrogen into the carbon steel during the pickling process.