PurposeThe purpose of this paper is to investigate the surface properties, particle sizes and corrosion inhibition performance of sodium dodecyl sulfate (SDS) in the presence of imidazolium-based ionic liquid as an additive. Up to now, different properties of alone surfactants and ionic liquids have been studied. However, few studies have been devoted to mixed ionic liquid and surfactant. The significance and novelty of this research is the investigation of 1-methylimidazolium trinitrophenoxide ([MIm][TNP]) as ionic liquid effects on SDS corrosion behavior.Design/methodology/approachThe inhibition effect of [MIm][TNP], SDS and their mixtures on mild steel surface in 2 M hydrochloric acid (HCl) solution was examined by electrochemical impedance spectroscopy, potentiodynamic polarization (PDP), scanning electron microscopy (SEM), atomic force microscopy and quantum chemical calculations as well as dynamic light scattering (DLS) and surface tension measurements to discuss surface properties of studied solutions.FindingsBased on the results, ionic liquid/SDS mixtures significantly indicated better inhibition properties than pure surfactant solution. PDP curves indicated that the studied compounds act as mixed-type of inhibitors. The critical micelle concentration, surface properties and particle sizes were investigated from the surface tension measurements and DLS results.Originality/valueAdsorption of the inhibitors on the steel surface obeyed the Villamil adsorption model. SEM was used for surface analysis and verified the inhibition efficiency of mixed IL/SDS system. Quantum chemical calculations were performed using density functional theory, and a good relationship between experimental and theoretical data has been obtained.