Two-dimensional (2D) materials, due to their unique electronic, optical and structural properties, have attracted extensive attention of researchers in the world. However, most of 2D materials have low optical absorption efficiencies in the visible and near-infrared regimes, which leads to the weak light–matter interaction and limits their further applications in optoelectronic devices. Thus, enhancing the light–matter interaction of various 2D materials in the visible and near-infrared regimes, has been a key topic for many optoelectronic equipment and related applications. In this topical review, we summarized the recent developments of the 2D materials-based optical absorbers in the visible and near infrared regimes, focusing mainly on the methods and relevant physical mechanisms of several typical perfect absorbers, such as narrowband perfect absorbers, dual-band perfect absorbers, and broadband perfect absorbers. Finally, several prospective research directions from our perspectives are presented at the end.