Single-photon detection and photon counting are useful tools in many fields, from light detection and ranging (LiDAR) to biomedical imaging and from time-resolved Raman spectroscopy to quantum applications. In this context, recently, single-photon avalanche diode (SPAD) sensors in standard CMOS technology have been receiving considerable attention from both scientific and industrial communities since they can provide single-photon detection and photon-counting capabilities along with some functionalities such as time-of-arrival evaluation and histogram processing in a cost-effective manner. In this review, we provide a comprehensive view of the CMOS SPAD technology: from fundamentals to cutting-edge technologies including three-dimensional (3D)-stacked CMOS SPAD sensors. (C) 2018 The Japan Society of Applied Physics