The causes of pitting corrosion in welded joints of S30403 stainless steel pipeline were analyzed through methods such as macroscopic morphology observation,chemical composition analysis,microstructure examination,energy spectrum evaluation,and 8-ferrite content detection.The results indicated that the heat affected zone in the welded joint was affected by the increase of austenite grains and residual stress,which weakened the protective effect of Cr2O3 passivation film on its surface and led to pitting corrosion.The mass fraction of 8-ferrite in the weld was about 13%,and the mass fractions of Cr and Ni in the 8-ferrite structure were 24.58%and 5.06%,respectively.However,the mass fractions of Cr and Ni in the austenitic structure of the weld were 17.98%and 9.56%,respectively.The chemical compositions of the two structures were significantly different.Galvanic corrosion led to preferential corrosion of 8-ferrite in corrosive medium containing sulfur.