The films formed on AZ31B magnesium alloy were prepared from alkaline solution composed of potassium permanganate and sodium hydroxide. The immersion tests were carried out at the different concentration of sodium hydroxide and pre-teatment method in 5 minute. The morphology and the phase composition of the film were characterized by scanning electron microscopy (SEM) and X-ray diffraction (XRD). The corrosion behavior of the film in 5.0% NaCl solution was evaluated using potentiodyanmic polarization. Open circuit potential in developing film was examined with time. The thin and transparent film was mainly composed of MgO and Mg(OH)₂. The film with the best corrosion resistance was obtained at 70oC bath temperature, 1.6 M concentration of sodium hydroxide and chemical pre-treatment.