Dye-sensitized solar cell (DSSC) has a great potential to convert solar light into electricity. In this article, a prototype of DSSC had been successfully fabricated using ZnO:Al thin film and dye from red dragon fruit as a working electrode. ZnO:Al thin films were prepared by a sol-gel spin coating method with variation of post-heating temperatures. The XRD result confirms that all ZnO:Al thin films have a hexagonal structure with crystal sizes of 16 nm to 41 nm. SEM analysis showed the nanoparticles with particle size of 30 nm to 80 nm. The bandgap ranges from 3.16 eV to 3.40 eV. The EIS analysis reveals that charge transfer resistance greatly decreases with the rise of temperature. The efficiency of DSSC gradually improved with increasing the post-heating temperature. ZnO:Al with a post-heating temperature of 600°C had the highest efficiency of 0.398%.