Severe plastic deformation by high pressure torsion (HPT) is used to process and refine the grain structure of commercial purity magnesium and AZ31, AZ91, and ZK60 magnesium alloys. Transmission electron microscopy shows that the microstructure of pure magnesium is characterized by a bi‐modal grain size distribution with grains in the range of a few microns and ultrafine grains after HPT, whereas the magnesium alloys display a homogeneous ultrafine grain structure after processing. X ray diffraction analysis reveals that the AZ91 alloy displays the largest lattice microstrain and this alloy also exhibits the highest hardness after processing. The processed AZ31 and the ZK60 alloys show similar microstructures and maximum values of hardness. Contrary to earlier reports of significant improvements in the corrosion resistance of magnesium alloys in biological environments, the present results show that processing by HPT has no significant effect on the corrosion behavior of magnesium alloys in a 3.5% NaCl solution. By contrast, pure magnesium exhibits an increased corrosion resistance after HPT.