An environment friendly phytic acid conversion coating was prepared on the surface of AZ91 D magnesium alloy by chemical conversion.The single factor experiment and orthogonal experiments were conducted through controlling the factors of pH value,temperature,reaction time,phytic acid mass fraction,etc.The optimum process conditions are determined as follows:phytic acid 3 %,NaF 3g/L,H3BO3 40 g/L,Ce(NO3)3·6H2O 5 g/L,pH 4.5.By using the optimized process,a film,macroscopically grayish and compact,with fine cracks microscopically,can be obtained on the magnesium alloy substrate surface.XRD test shows that the main components of the phytic acid conversion coating are MgH10O24P6 and CeO2.The corrosion resistance test analysis shows that the phytic acid conversion coatings can effectively improve the corrosion resistance of magnesium alloy.