In a population-based case-control study of 642 childhood cancer cases and the same number of matched controls in Shanghai, China, we evaluated the relationship between diagnostic X-ray (preconception, pre- and post-natal) and antenatal ultrasound exposure and the subsequent risk of developing three major types of childhood cancer (acute leukaemia, lymphoma and brain tumours) and all childhood neoplasms combined. Consistent with previous studies, prenatal X-ray exposure was found to be associated with an 80% increased risk of childhood cancers, although the estimation was based on 4% and 2% exposed cases and controls and was only marginally statistically significant (P = 0.08). Post-natal X-ray exposure was also linked with a small elevation in the risk of all cancers and the major categories of malignancies in children. Little evidence, however, was found to relate parental preconception X-ray exposure with the subsequent cancer risk in offspring, regardless of the exposure window and the anatomical site of X-ray exposures. This study adds further to the growing literature indicating that antenatal ultrasound exposure is probably not associated with an increased risk of childhood cancer.