A compact single photon detector designed for the detection in the visible spectral range is presented. A fast active quenching circuit is integrated on the chip in order to operate the APD in single photon counting mode. The sensor consists of a 0.8x0.8mm2 silicon chip mounted on a thermo-electric cooler and packaged in a standard TO5 header, bringing the degree of miniaturization to a level never reached. Reliability, compactness, low power and low cost make the detector essential for portable devices, implantable sensors, fluorescence lifetime spectrometers or laser scanning microscopes. In addition, the sensor exhibits best-in-class timing resolution of 50ps. The photon detection probability peaks in the blue/green at almost 35% and is limited to a few percents in the red and near-infrared regions. When cooled down to -10°C, the 50μm diameter diode achieves a dark count rate lower than 10Hz. The afterpulsing is maintained to a low level, below 1%. The fast active quenching circuit leads to a dead time of 50ns allowing a measurement frequency of up to 20MHz. The detector, unlike legacy photon counters, does not suffer from memory effects and is not damaged by ambient light.