Three compounds namely; 5‐(phenyl)‐4H‐1,2,4‐triazole‐3‐thiol, 3‐(decylthio)‐5‐phenyl‐1H‐1,2,4‐triazole and 3‐(benzylthio)‐5‐phenyl‐1H‐1,2,4‐triazole) were synthesized. The chemical structure of the prepared compounds was confirmed using FTIR and 1H‐NMR analysis. The compounds were tested as corrosion inhibitors against the corrosion of carbon steel in 1 M HCl using weight loss, polarization and electrochemical impedance methods. The results revealed that these compounds have significant inhibiting effects on the corrosion of carbon steel. Polarization studies showed that the compounds act as mixed‐type inhibitors which retard the anodic and the cathodic reactions with a predominant effect towards the cathodic reaction. The prepared compounds were evaluated as antimicrobial agents against sulfate‐reducing bacteria using the serial dilution method, which showed good biocidal action.