The rapid corrosion of magnesium alloys in physiological environment constraints its applications to employ it as a biodegradable implant material. AZ31 and ZK60 alloys were executed to anodization in alkaline solution as a function of time and investigated their electrochemical and mechanical properties. The scanning electron microscopy reveals the compact passive film formation subsequently to anodization. The high-resolution spectra of x-ray photoelectron spectroscopy confirmed the existence of MgO, Mg(OH)2 and traces of CO3 −2 within the anodized layer. The quasi-static with displacement-controlled mode of indentation was performed to investigate the mechanical properties of the anodized films. Anodized ZK60 has an average hardness of ~0.49 GPa, greater than the hardness of anodized AZ31-Ano (0.35 GPa). Similarly, the stiffness and film elastic modulus for anodized ZK60 were higher when compared with anodized AZ31. The surface roughness of anodized ZK60 (473.54 ± 51.61 nm) was higher than that of anodized AZ31 (112.11 ± 11.31 nm). The potentiodynamic polarization scans for AZ31 showed corrosion current density of 4.46 μA/cm2 (untreated) and 394.8 e−3 μA/cm2 (anodized), while in ZK60 corrosion current densities values shifted from 12.05 μA/cm2 (untreated) to 714.8 e−3 μA/cm2 (anodized). Similarly, electrochemical impedance spectroscopy indicated enhanced charge transfer resistance for anodized AZ31 (1.164 KΩ-cm2) and ZK60 (1.911 KΩ-cm2) when compared with untreated AZ31 (28.3 KΩ-cm2) and ZK60 (0.481 KΩ-cm2). Furthermore, MC3T3 preosteoblast cells on the anodized surfaces caused no adverse effects in regards to biocompatibility.