In this research, plasma electrolytic oxidation (PEO) coating on AZ31B magnesium alloy having various concentrations has been studied in order to amend the surface corrosion resistance. To do this, phosphate electrolyte with different concentrations of 4, 8 and 10 g/l is investigated. Electrochemical impedance spectroscopy and potentiodynamic polarization tests on an uncoated base alloy and a coated one are studied in a body simulant physiological solution (Ringer's solution). Surface morphology and microstructural surveys were done by Xray diffraction (XRD) pattern and scanning electron microscopy (SEM). The obtained results of this study displayed that rising the sodium phosphate concentration led to an increase in coating thickness and decreases its porosity. The highest corrosion resistance arose from the lowest corrosion current density (0.45×10-6 A/cm2) of the formed coating in electrolyte containing 10 g/l sodium phosphate.