Measurement connects the world of quantum phenomena to the world of classical events. It plays both a passive role, observing quantum systems, and an active one, preparing quantum states and controlling them. Surprisingly - in the light of the central status of measurement in quantum mechanics - there is no general recipe for designing a detector that measures a given observable. Compounding this, the characterization of existing detectors is typically based on partial calibrations or elaborate models. Thus, experimental specification (i.e. tomography) of a detector is of fundamental and practical importance. Here, we present the realization of quantum detector tomography: we identify the optimal positive-operator-valued measure describing the detector, with no ancillary assumptions. This result completes the triad, state, process, and detector tomography, required to fully specify an experiment. We characterize an avalanche photodiode and a photon number resolving detector capable of detecting up to eight photons. This creates a new set of tools for accurately detecting and preparing non-classical light.