We present the design and characterization of a large-area, fast-gated, all-digital single-photon detector with programmable active area, internal gate generator, and time-todigital converter (TDC) with a built-in histogram builder circuit, suitable for performing high-sensitivity time-domain nearinfrared spectroscopy (TD-NIRS) measurements when coupled with pulsed laser sources. We used a novel low-power differential sensing technique that optimizes area occupation. The photodetector is a time-gated digital silicon photomultiplier (dSiPM) with an 8.6-mm 2 photosensitive area, 37% fill-factor, and ∼300 ps (20%-80%) gate rising edge, based on low-noise single-photon avalanche diodes (SPADs) and fabricated in 0.35-µm CMOS technology. The built-in TDC with a histogram builder has a least-significant-bit (LSB) of 78 ps and 128 time-bins, and the integrated circuit can be interfaced directly with a low-cost microcontroller with a serial interface for programming and readout. Experimental characterization demonstrated a temporal response as good as 300-ps full-width at half-maximum (FWHM) and a dynamic range >100 dB (thanks to the programmable active area size). This microelectronic detector paves the way for a miniaturized, stand-alone, multi-wavelength TD-NIRS system with an unprecedented level of integration and responsivity, suitable for portable and wearable systems. Index Terms-Digital silicon photomultiplier (dSiPM), fastgated single-photon avalanche diode (SPAD) array, photon counting, time-to-digital converter (TDC), time-domain near-infrared spectroscopy (TD-NIRS). I. INTRODUCTION T IME-DOMAIN near-infrared spectroscopy (TD-NIRS) is a powerful technique for obtaining non-invasive, in vivo measurements of tissue constituents and structure [1]. This can be exploited in many scientific fields, from a clinical Manuscript