The XENON1T dark matter experiment aims to detect weakly interacting massive particles (WIMPs) through low-energy interactions with xenon atoms. To detect such a rare event necessitates the use of radiopure materials to minimize the number of background events within the expected WIMP signal region. In this paper we report the results of an extensive material radioassay campaign for the XENON1T experiment. Using gamma-ray spectroscopy and mass spectrometry techniques, systematic measurements of trace radioactive impurities in over one hundred samples within a wide range of materials were performed. The measured activities allowed for stringent selection and placement of materials during the detector construction phase and provided the input for XENON1T detection sensitivity estimates through Monte Carlo simulations.