Purpose This study aims to investigate the effect of different pore diameter and pore length on corrosion properties of anodic aluminum oxide (AAO) film. Design/methodology/approach AAO layer was produced by two-step anodization aluminum in oxalic acid. The surface morphology was investigated using field emission scanning electron microscopy. The pore diameters were ranging from 25 +/- 5 to 65 +/- 5 nm and the pore length ranging from 5 to 17 mu m. The corrosion properties of the AAO films was analyzed by potentiodynamic polarization and electrochemical impedance spectroscopy tests. Corrosion properties and morphology of the anodic films depending on anodization times and pore expansion times were evaluated. Findings All highlights of this work can be summarized with the following specified below: more treatment with the protective barrier layer of the solution as the pore diameter increases depends on the morphology of the nanotube structured AAO layer. The excellent corrosion resistance renders AAO films without pore expansion very promising. The oxide layer thickness does not affect the corrosion resistance. The better corrosion resistance of AAO films at low pore length can be ascribed to the barrier layer thickness and the more homogeneous structure. The presence of defects for the higher pore length decreases its corrosion resistance. Originality/value The AAO films were fabricated by a two-step anodization method in oxalic acid. The anodization times and pore expansion times affect the corrosion performance. The AAO film without pore expansion has good corrosion resistance. The corrosion resistance decreases as the pore length increases.