The resistance to pitting and intergranular corrosion of the welded joint of X5CrNi18‐10 austenitic stainless steel is analyzed in this paper. The resistance of the welded joint to intergranular corrosion does not depend on the nitrogen content in the shielding gas. It depends on the heat input into the welded joint, that is, on the welding current intensity. The resistance to pitting corrosion depends on the content of nitrogen in the shielding gas and on the welding current intensity. With the increase in the nitrogen content in the shielding gas, the resistance of the heat affected zone (HAZ) to pitting corrosion increases. The welding current intensity (heat input into the welded joint) shows two opposite effects. On the one hand, the increase of the heat input into the welded joint causes a more intensive precipitation of chromium carbides along the grain boundaries, which then leads to depletion in chromium of the grain boundary areas. The sensitization degree of the HAZ is thus increased and the formation of pits easier. On the other hand, with the increase in the welding current intensity, diffusion of nitrogen from the weld metal into the HAZ is facilitated, which contributes to the increased HAZ resistance to pitting corrosion. Possible mechanisms for increasing the HAZ resistance to pitting corrosion in the presence of nitrogen are also considered.