High quality textured ZnO:Al electrode can improve the energy conversion efficiency of silicon based thin film solar cells. Two groups of ZnO:Al films were fabricated under different sputtering powers. Different textured surfaces were got when corroding ZnO:Al films with diluted HCl solutions of different concentration. The transmission spectrum and square resistance of the samples were measured. The dependence of sputtering power and corrosion time on the resistivity, transmittance and surface texture of the samples were studied. The results showed that the density of the ZnO:Al film was mainly affected by sputtering power. The compactness of the film increases with the increase of sputtering power. The corrosion rates of the samples with different compactness follow different rules. High quality textured ZnO:Al electrode was obtained when the ZnO:Al film deposited under sputtering power of 200W was corroded by diluted HCl solution of 0.5%.