The nature of zero bandgap has limited the applications of graphene for potential electronic devices, such as p–n junctions and transistors, etc. Here we report a simple methodology that can tune the bandgap of graphene by using ultraviolet (UV) irradiation. Most importantly, such a bandgap transition is reversible and can be controlled by the alternative treatment of UV irradiation and dark storage. In addition, density functional theory (DFT) calculations are performed to reveal the underlying mechanism of bandgap behavior in this reversible transition. Both experimental and computational results demonstrate that it is a promising technology for applications of graphene in electronic devices.