The electronic, optical, and anticorrosion properties of planer ZnO crystal and quantum dots are explored using density functional theory calculations. The calculations for the finite ZnO quantum dots were performed in Gaussian 16 using the B3LYP/6-31g level of theory. The periodic calculations were carried out using VASP with the plane wave basis set and the PBE functional. The subsequent band structure calculations were performed using the hybrid B3LYP functional that shows accurate results and is also consistent with the finite calculations. The considered ZnO nanodots have planer hexagonal shapes with zigzag and armchair terminations. The binding energy calculations show that both structures are stable with negligible deformation at the edges. The ZnO nanodots are semiconductors with a moderate energy gap that decreases when increasing the size, making them potential materials for anticorrosion applications. The values of the electronic energy gaps of ZnO nanodots are confirmed by their UV-Vis spectra, with a wide optical energy gap for the small structures. Additionally, the calculated positive fraction of transferred electrons implies that electron transfer occurs from the inhibitor (ZnO) to the metal surface to passivate their vacant d-orbitals, and eventually prevent corrosion. The best anti-corrosion performance was observed in the periodic ZnO crystal with a suitable energy gap, electronegativity, and fraction of electron transfer. The effects of size and periodicity on the electronic and anticorrosion properties are also here investigated. The findings show that the anticorrosion properties were significantly enhanced by increasing the size of the quantum dot. Periodic ZnO crystals with an appropriate energy gap, electronegativity, and fraction of electron transfer exhibited the optimum anticorrosion performance. Thus, the preferable energy gap in addition to the most promising anticorrosion parameters imply that the monolayer ZnO is a potential candidate for coating and corrosion inhibitors.