Thin films with tunable porosity are of high interest in applications such as gas sensing and antireflective coatings. We report a facile and scalable method to fabricate ZnO electrodes with tuneable porosity. By adjusting the substrate temperature and ratio of precursor gasses during lowpressure chemical vapor deposition we can accurately tune the porosity of ZnO films, from 0 up to 24%. The porosity change of the films from dense layer to separated nanopillars results in an effective refractive index reduction from 1.9 to 1.65 at 550 nm, as determined by optical and x-ray spectroscopy. The low-refractive-index ZnO films are incorporated into amorphous silicon solar cells demonstrating reflection losses reduction down to 4% in the visible wavelengths range.