The plasma electrolytic oxidation (PEO) coatings were prepared on AZ91D magnesium in silicate electrolytes containing SnSO4. The characterization of the coatings was investigated by scanning electron microscopy, energy-dispersive spectroscopy, x-ray diffraction, Raman spectra, x-ray photoelectron spectroscopy and electrochemical experiments. The results indicated that the addition of SnSO4 transformed the porous PEO coating into a more compact one. The main composition of the coating was MgO and MgSiO4. SnSO4 successfully doped into the coating in the form of SnO2. The impact of SnO2 remarkedly dropped the size and number of micro-pores and micro-cracks. Meanwhile, SnO2 in the coating acted as a barrier to the diffusion pathway of electrolyte and restrained aggressive compounds accessing to the substrate. Thus, from the electrochemical test, the coating with SnO2 revealed better corrosion than the coating without. The optimum concentration of SnSO4 was 0.3 g/L. The current potential and corrosion current density were - 1.51 V and 6.85 x 10(-8) A, respectively.