In order to improve the corrosion resistance of Mg alloys in applications as degradable implant material. Fluoride conversion coating was synthesized on Mg alloy AZ31 by immersion in hydrofluoric acid (HF) with various concentrations. The effect of hydrofluoric acid (HF) treatment on the corrosion behavior of the Mg alloy AZ31 was investigated by potentiodynamic electrochemical technique and immersion tests. The XRD analysis indicated the fluoride conversion coating was amorphous, with smooth and compact surface. Electrochemical and immersion tests proved that the fluoride conversion coatings significantly improved the corrosion resistance of AZ31. The most improved corrosion protection was achieved using the concentrations of 40 % and 72 h of treatment time, resulting in corrosion rates 20 times lower than those of untreated samples, showing that fluoride coating by conversion treatment is a simple and promising way of enhancing the corrosion resistance of Mg in Hanks' solution.