M2 HSS grades square bars can be welded, although it is advised to pre-heat the metal and heat it again after the welding process to reduce the chance of cracking and preserve the steel's desired qualities. To lessen the thermal stress that develops during welding, steel is heated prior to joining it together. Additionally, this procedure aids in preventing the production of brittle martensite in the heat-affected zone (HAZ). After welding, the HAZ is subjected to a post-weld heat treatment to reduce residual stress and enhance its microstructure. Additionally, this will support keeping the steel's ideal qualities.