The inhibition effect of <svg style="vertical-align:-0.17555pt;width:12.2875px;" id="M1" height="13.175" version="1.1" viewBox="0 0 12.2875 13.175" width="12.2875" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,13.175)"> <g transform="translate(72,-61.46)"> <text transform="matrix(1,0,0,-1,-71.95,61.69)"> <tspan style="font-size: 12.50px; " x="0" y="0">5</tspan> </text> <text transform="matrix(1,0,0,-1,-65.7,67.01)"> <tspan style="font-size: 8.75px; " x="0" y="0"></tspan> </text> </g> </g> </svg>-phenyl-<svg style="vertical-align:-0.0pt;width:12.2875px;" id="M2" height="12.7625" version="1.1" viewBox="0 0 12.2875 12.7625" width="12.2875" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,12.7625)"> <g transform="translate(72,-61.79)"> <text transform="matrix(1,0,0,-1,-71.95,61.84)"> <tspan style="font-size: 12.50px; " x="0" y="0">2</tspan> </text> <text transform="matrix(1,0,0,-1,-65.7,67.01)"> <tspan style="font-size: 8.75px; " x="0" y="0"></tspan> </text> </g> </g> </svg>,<svg style="vertical-align:-0.0pt;width:12.2875px;" id="M3" height="12.7625" version="1.1" viewBox="0 0 12.2875 12.7625" width="12.2875" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,12.7625)"> <g transform="translate(72,-61.79)"> <text transform="matrix(1,0,0,-1,-71.95,61.84)"> <tspan style="font-size: 12.50px; " x="0" y="0">4</tspan> </text> <text transform="matrix(1,0,0,-1,-65.7,67.01)"> <tspan style="font-size: 8.75px; " x="0" y="0"></tspan> </text> </g> </g> </svg>-dihydrospiro[indole-3,<svg style="vertical-align:-0.17555pt;width:12.2875px;" id="M4" height="12.9875" version="1.1" viewBox="0 0 12.2875 12.9875" width="12.2875" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,12.9875)"> <g transform="translate(72,-61.61)"> <text transform="matrix(1,0,0,-1,-71.95,61.84)"> <tspan style="font-size: 12.50px; " x="0" y="0">3</tspan> </text> <text transform="matrix(1,0,0,-1,-65.7,67.01)"> <tspan style="font-size: 8.75px; " x="0" y="0"></tspan> </text> </g> </g> </svg>-pyrazol]-2(1<i >H</i>)-one (SPAH) on mild steel corrosion in 1 M HCl and 0.5 M H<sub >2</sub>SO<sub >4</sub> has been studied by weight loss, effect of temperature, electrochemical techniques, and quantum chemical studies. The inhibition efficiency increases with increasing concentration of inhibitor but decreases with increase in temperature. The adsorption of inhibitor on mild steel surface has been found to obey Langmuir and Temkin’s adsorption isotherm. Potentiostatic polarization results revealed that SPAH acts as mixed type inhibitor. The values of activation energy (<svg style="vertical-align:-3.22282pt;width:17.4px;" id="M5" height="14.35" version="1.1" viewBox="0 0 17.4 14.35" width="17.4" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,14.35)"> <g transform="translate(72,-60.52)"> <text transform="matrix(1,0,0,-1,-71.95,63.79)"> <tspan style="font-size: 12.50px; " x="0" y="0">𝐸</tspan> </text> <text transform="matrix(1,0,0,-1,-63.02,60.66)"> <tspan style="font-size: 8.75px; " x="0" y="0">𝑎</tspan> </text> </g> </g> </svg>), free energy of adsorption (<svg style="vertical-align:-0.15048pt;width:27.65px;" id="M6" height="10.8875" version="1.1" viewBox="0 0 27.65 10.8875" width="27.65" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,10.8875)"> <g transform="translate(72,-63.29)"> <text transform="matrix(1,0,0,-1,-71.95,63.49)"> <tspan style="font-size: 12.50px; " x="0" y="0">Δ</tspan> <tspan style="font-size: 12.50px; " x="9.0271664" y="0">𝐺</tspan> </text> <text transform="matrix(1,0,0,-1,-53.5,68.56)"> <tspan style="font-size: 8.75px; " x="0" y="0">∘</tspan> </text> </g> </g> </svg>), enthalpy of adsorption (<svg style="vertical-align:-0.0pt;width:26.4625px;" id="M7" height="10.6625" version="1.1" viewBox="0 0 26.4625 10.6625" width="26.4625" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,10.6625)"> <g transform="translate(72,-63.47)"> <text transform="matrix(1,0,0,-1,-71.95,63.52)"> <tspan style="font-size: 12.50px; " x="0" y="0">Δ</tspan> <tspan style="font-size: 12.50px; " x="9.0271664" y="0">𝐻</tspan> </text> </g> </g> </svg>), and entropy of adsorption (<svg style="vertical-align:-0.1254pt;width:22.6625px;" id="M8" height="10.8125" version="1.1" viewBox="0 0 22.6625 10.8125" width="22.6625" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(1.25,0,0,-1.25,0,10.8125)"> <g transform="translate(72,-63.35)"> <text transform="matrix(1,0,0,-1,-71.95,63.52)"> <tspan style="font-size: 12.50px; " x="0" y="0">Δ</tspan> <tspan style="font-size: 12.50px; " x="9.0271664" y="0">𝑆</tspan> </text> </g> </g> </svg>) were calculated. Surface analysis (SEM) was also carried out to establish the mechanism of inhibitor on mild steel corrosion in acid medium. Quantum chemical studies using DFT were employed to explain the experimental results obtained in this study and to further give insight into the inhibition action of SPAH on the mild steel surface.