PurposeThe purpose of this paper is to describe how fabricate solar cell based‐on porous silicon (PS) prepared by electrochemical etching process is fabricated and the effect of porosity layer on the solar cell performance is investigated.Design/methodology/approachThe techniques used include SiO2 thermal oxidation, ZnO/TiO2 sputtering deposition and PS prepared by electrochemical etching. Surface morphology and structural properties of porous Si were characterized by using scanning electron microscopy. Photoluminescence and Raman spectroscopy measurements were also performed at room temperature. Current‐voltage measurements of the fabricated solar cell were taken under 80 mW/cm2 illumination conditions. Optical reflectance was obtained by using optical reflectometer (Filmetrics‐F20).FindingsPore diameter and microstructure are dependent on anodization condition such as HF: ethanol concentration, duration time, temperature, and current density. On other hand, a much more homogeneous and uniform distribution of pores is obtained when compared with other wafer prepared with different electrolyte composition.Originality/valuePS is found to be an excellent anti‐reflection coating against incident light when it is compared with another anti‐reflection coating and exhibits good light‐trapping of a wide wavelength spectrum which produce high efficiency solar cells (11.23 per cent).